Since we are on christmas mood i decided to release something about it, that you guys can use for so many things (feel free to edit), since im portuguese sry for bad english and maybe the portuguese community start to have creativity to expand what’s released and not simply copy+paste.
Description :
This is a script that i set to when a player executes the command near the tree he will receive a gift, i set it to give a faggio to the player(owned_vehicles), i also added secures so player cant spam the command and only 1 gift per account.
Feel free to edit, since this version was made in minutes but its safe and functional
Requirements:
ESX
Configuration:
Change the sql query delbes_gift-sv.lua on “goldengaming:receberprenda” event and set what do you want to give, currently its set to give one faggio.
Don’t forget to adapt the query to your server database since mine may be different from yours
Installation
Drag and drop into your resources
Add INT(1)column into your “users” table with default value “0”
My column name is “recebeu_prenda_natal” if you put another column name, go change on the sql query
Add the resource name into your server.cfg
Credits
ESX_VehicleShop for the generateplate function
Video
In the video i show what the script makes in detail. Video
Unlisted this because of two possible exploits in your resource, please fix these and it will be listed again
–
1. You are inserting a new vehicle everytime a client calls goldengaming:receberprenda, you are not checking if client already used their gift on the serverside, any attacker could trigger this event and end up with 1000 vehicles. Please add a check to this event to make sure player hasn’t already used their gift (on server)
2. You are generating the license plate on the client, every attacker could call this event with every possible license plate and even insert duplicate licenses plates. Please add a check to this event to make sure license plate isn’t already taken and preferably generating on server
EDIT
3. Any attacker could call goldengaming:receberprenda without then calling goldengaming:atualizarvalor and it would still allow them to end up with 1000 vehicles, please add your code to set gift as taken in database to the same event
Hmm not now, its easier than u guys think, for the chat its just a prefix with lua os.time id of the player and some text, on the css put it with an outline
For you guys getting error with “gg_notify” just go to the delbes_gift-cl.lua and swap the exports[‘gg_notify’] to exports[‘mythic_notify’] or whatever notification system you have.