> For the complete documentation index, see [llms.txt](https://docs.kojascripts.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kojascripts.eu/old/crafting-free/step-by-step-guide.md).

# Step By Step Guide

1. Download and upload the resource to your server files.
2. Import the SQL file to your database
3. Add `ensure koja-crafting` to your server.cfg
4. Configure `config.lua to your likings`
5. Give your players something new to do!

> How to add XP?
>
> > You need to add a trigger to end of a function that a player needs to finish

{% code title="EXAMPLE:" overflow="wrap" %}

```
> Server.lua
RegisterServerEvent('koja-job:server:success')
AddEventHandler('koja-job:server:success', function()
	local xPlayer = ESX.GetPlayerFromId(source)
	TriggerEvent('koja-crafting:addXP', xPlayer.source, XP_AMOUNT)
end)



> Client.lua
RegisterNetEvent("koja-job:client:success", function()	
    TriggerServerEvent('koja-crafting:addXP', XP_AMOUNT)
end)


```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kojascripts.eu/old/crafting-free/step-by-step-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
