Hello, This script makes things easier when you want to host a giveaway on your roleplay server by creating a code that the players can redeem.
Dependency
Installation
- Git clone this repository or download the latest release from GitHub
- Configure
config.lua
- Open
client.lua
and change the notification to yours - Import the SQL
vyzo_giveaway.sql
- Add
ensure vyzo_giveaway
onserver.cfg
after oxmysql and oxlib
Usage
- /cga to create a new giveaway
- /redeem to redeem a code
- Format to give reward type car: car_CARMODEL_PLATE. Example: car_adder_VYZO or car_adder
Features
- 0.00ms resmon when idle and 0.001ms for a blink of an eye when executing the command
- Use your own code or auto-generated code with flexible configuration
- Set how many players can redeem a code
- Support logging into Discord using the Discord webhook
- Check the code format before executing any queries (check
server.lua
, default are commented) - Available in 3 languages
- Supported reward type:
money
,bank
,items
, andcar
(for ox_inventory users, items are not attached to a database so you can give weapons too)
Note
- Tested with ESX Legacy 1.8.5 and working fine
- You need to have esx_vehicleshop running or at least have the SQL table imported if you want to make the reward type car
- Change the notification in
client/client.lua
to your notification
Preview
Download
Todo
- No idea
Changelog
v1.2.0
Features
- Add reward type: car
- Add option can a player redeem the same code more than one
Refactor
- Move the function into a separate file
server/utils.lua
for better readability
v1.1.0
Features
- Added update functionality: Creating a giveaway with the same code will update the existing data on the database
- Added optional automatic data deletion when the code reached its maximum usage (lulu3 suggestion)
- Added SQL file missing
- Added Dutch translation
- Update en & id translation
Refactoring
- Change callback value for better readable and give more optionality to add conditional logic on creating a giveaway function
v1.0.0
Initial release
Better Version
[] [PAID] [ESX] no_redeem use code vyzo
for 5% off