Follow the guide to install ngd-Bridge HERE.
Download and place ngd-redemption
AND ngd-interactiondialog
into your [ngd] folder. This script must be started after ngd-Bridge
.
Game Server Commands
when package is purchased
field, put the following:NGDRedemption {packageId} {transaction}
Package ID
, and will be used to configure the items in the script.Package ID
from the step above, into the [] and configure each package-- Type =
(You can use 'item', 'vehicle', money
, name
, job
or 'other')
-- Label =
(This is what is show in-game)
-- Item =
(This is the item given to players if the Type = 'item')
-- Qty =
(This is the amount of the item given above)
-- Model =
(This is the vehicle spawn code if Type = 'vehicle')
6650632
is an item that is given to players, the menu will show it as a 'Criminal's Goody Bag', and the player will be given the quantity of each item.6650679
is a vehicle, the menu will show it as 'Pagassi - Zentorno' and the spawn code is a 'zentorno'6778910
will show in the menu as Bag Of Money!
, and the player will get 10000 cash. (This is for servers that don't have cash
as an item)54321
will show in the menu as Change Your Name!
- The player will be able to change their name, and will be restricted to 25 characters.7891011
will show in the menu as Redeem
job. The player would have the job police
set at grade 2.12345
is custom. You can pass whatever variables you want to a server event.Config.Packages = {
[6650632] = {
Type = 'item',
Label = 'Criminal\'s Goody Bag!',
Items = {
{ Item = 'lockpick', Qty = 5 },
{ Item = 'tosti', Qty = 1 }
}
},
[6650679] = {
Type = 'vehicle',
Label = 'Pagassi - Zentorno',
Model = 'zentorno'
},
[6778910] = {
Type = 'money',
Label = 'Bag Of Money!',
MoneyType = 'cash',
MoneyAmount = 10000
},
[54321] = {
Type = 'name',
Label = 'Change your name!',
CharacterLimit = '25',
},
[7891011] = {
Type = 'job',
Label = 'Redeem Job',
JobName = 'police',
JobGrade = 2
},
[12345] = {
Type = 'other',
Label = 'Custom Package Example',
CustomVariable1 = 'CV1',
CustomVariable2 = 'CV2'
}
}
Item = 'other
is set, you can set your own logic to give players whatever you would like inside of the editableserver.lua
using the function:function GiveCustom(data)
end
The above are just examples. Please modify them to fit your server.
You MUST set your garage in the
editableserver.lua
file. If you need help, open a ticket in our Discord
Config.GarageName
to ensure the vehicles are put into the correct garage!editableserver.lua
file.The script comes with an optional 'test drive' feature that allows you to make it so players can test drive premium vehicles before purchasing them on your Tebex store.
This is enabled by default, and all you have to do is configure what vehicles you want, their label that will show up in the menu and the locations where the player is teleported back when the test drive is complete.
Config.TestDrives = {
Enabled = true,
Time = 2, --minutes
SpawnLocation = vector4(-1319.23, -2181.06, 13.94, 152.21),
ReturnLocation = vector4(158.26, -739.98, 246.15, 66.94),
Vehicles = {
['zentorno'] = {
Label = 'Zentorno'
},
['faggio'] = {
Label = 'Awesome Moped'
}
}
}
--Fuel System:
Config.VehicleFuel = function(vehicle)
Entity(vehicle).state.fuel = 100
end
--Keys System:
Config.TestDriveVehicleKeys = function(vehicle, plate)
exports['ngd-smallresources']:GiveLogicalKey(plate)
end
--Plate
Config.TestDriveVehiclePlate = function(vehicle)
local uniquePlate = 'Prem' .. math.random(1000, 9999)
SetVehicleNumberPlateText(vehicle, uniquePlate)
end
Config.LogType = 2
, and add your webhook into the top of the editableserver.lua
file.server.cfg
and add the following:set fivemerr_ngdredemption 'YOUR_API_KEY'
YOUR_API_KEY
with your API key from the Fivemerr dashboard.editableserver.lua
function CustomLogs(data, message)
end
Config.LogType = 2
, and add your webhook into the top of the editableserver.lua
file.server.cfg
and add the following:set fivemerr_ngdredemption 'YOUR_API_KEY'
YOUR_API_KEY
with your API key from the Fivemerr dashboard.editableserver.lua
function CustomLogs(data, message)
end
translate.lua
file, as this is where you will be able to set the name of your store, garage information, etc.Do you still need help? Open a ticket in our Discord