Config.timeStart to modify the time that the script takes to execute the animation and functions
important: the webhook was passed to the server side for greater security, this means that you must manually configure it inside the server.lua if you donât, the log system will not work.
if you do not configure the webhook on the server.lua this error will appear:
You need to register the items in the database using sql.sql and then get close to a car (regardless of whether the car is yours or not) and use the fakeplate item with the wrench in your inventory.
the wrench check item was not working for me and I fixed it in this way. I donât know if this problem just happened to me or not.
in server.lua iâve apply this change :
ESX.RegisterUsableItem(âfakeplateâ, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
local item = xPlayer.getInventoryItem(âwrenchâ).count
if item > 0 then
TriggerClientEvent('fakeplate:newPlate', source)
else
xPlayer.showNotification('You forgot a tool!')
end
end)
ESX.RegisterUsableItem(âoldplateâ, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
local item = xPlayer.getInventoryItem(âwrenchâ).count
if item > 0 then
TriggerClientEvent('fakeplate:oldPlate', source)
else
xPlayer.showNotification('You forgot a tool!')
end
Simply. create a channel in your discord server, Right click and edit it, youâll see a sub section called âintegrationsâ simply create a webhook from their, copy the link and pasted it into the required section in the server.lua
I made the webhook configuration easier on the server side
Correction in checking the wrench item in the playerâs inventory
line 104 you have the possibility of having a prop in the playerâs hand when he starts to change the plate, I leave the correction of the coordinate of the prop in the characterâs hand with you
Hey where would I put the export for the keys? Whenever I change the plate I need to hotwire the car. I tried adding it to where the fake plate is generated but I get a error saying no such export exist but it works with all my other car scripts
local plate = GetVehicleNumberPlateText(vehicle)
exports[âonyxLocksystemâ]:givePlayerKeys(plate)