πͺSetup
Steps
1. Dependcies
es_extended (legacy)
oxmysql
ox_lib
tebex store for the premium page
2. Language
To change the language the script uses, you have to change the ox_lib locale.
To change the singles messaages head to locales/lang.json. You have to go into the file that fits to the language you set, or you may have to create it. Please dont change the key, this will break something. Just change the value. Notice that the %s are placeholders.
3. Configuration
The main settings are handled with convars. This is a list of the convars you can set, and to what it defaults.
To set the count of tasks. (max. 4)
set syntax_dailyrewards:taskCount 4To set the time when the tasks refresh. The arg is a cron expression.
To enable the usage of ox_target
To set the premium package - The ID is there:

4. Notification
Shared functions are located in the shared.lua
5. Data Files
There are 3 data files.
Those files are loaded and need to return a table.
NOTE: the image argument should always be the file name of an image located in web/img.
5.1. Locations
Located in data/locations.lua
LuaLS annotation:
5.2. Rewards
Located in data/rewards.lua and data/premium_rewards.lua
LuaLS annotation:
5.3. Tasks
Located in data/tasks.lua
LuaLS annotation
The tasks we provide to you are not ready to be used in producted. There aren't any security checks and they are just as an example. If you have a task with id 6 and its mission it is to farm 5 bread. In your farming script after farming a bread trigger the following:
It is a server event with args: playerId, taskId, count
Note: Our script will automaticly notify the player when a task is complete and we will cancel the event. Dont worry.
6. Saving
We use a caching system to save the taskdata, which leads to a better performance.
To save the data: restart the server, drop a player, execute /savetaskdata.
Last updated