โ๏ธSetup Server
How to setup server for GPT
Last updated
How to setup server for GPT
Last updated
If you already use system like this just skip this part
Go to your es_extended / server / main.lua and find variable "loadPlayer"
if you find that, add in this id
like on screenshot below.
Next scroll to function LoadESXPlayer and add ssn = nil
in userData table
Next add userData.ssn = tonumber(result.id
below result
Next scroll to local xPlayer = CreateExtendedPlayer
and add userData.ssn
in arguments
Next add Core.playersBySsn[userData.ssn] = xPlayer
like on screenshot
Next scroll to playerDropped
event handler and add Core.playersBySsn[xPlayer.ssn] = nil
also do it in esx:playerLogout
Next go to server / common.lua and add Core.playersBySsn = {}
Next go to server / functions.lua and add new function like on screenshot
Next go to server / classes / player.lua and add ssn
argument in function CreateExtendedPlayer
Next add self.ssn = ssn
and add statebag stateBag:set("ssn", self.ssn, true)
Thats all, at the end make sure ur column id
in users are auto increment
You can skip this part if you already use one.
Go to your vehicle shop server side file and find MySQL execute to database like on screenshot.
Next add vin in columns and values like on screenshot below.
And thats all, if you want to add vin for givecar script, its very similiar.