Some modification and feature of my last post …
https://hastebin.com/lesehixiqu.lua - Server
https://hastebin.com/dafezupiwu.lua - Client
- Add : Limit slot by class vehicle
- Add : Not possible to open when the vehicle is closed ( status lock 2 and 7 )
- Add : Some alert ( Full, No more slot, etc )
- Fix : Solved a problem with the items list after reboot.
NB : please add this line into the “inventory_client.lua” of your “fivemenu” folder
RegisterNetEvent(“player:receiveItem”)
Tips : If some people want generate random plate when you buy a new vehicule in La_Life go inside your vehshop_s.lua and search vehshop:GetIdentifier add this.
AddEventHandler('vehshop:GetIdentifier', function()
TriggerEvent('es:getPlayerFromId', source, function(user)
local player = user.identifier
local L = #player - 4
local L1 = #player - 3
local L2 = #player - 2
local L3 = #player - 1
local plate = RandPlate() .. "Z" .. player[L] .. player[L1] .. player[L2] .. player[L3]
plate = string.upper(plate)
TriggerClientEvent("vehshop:f_GetIdentifier", source, plate)
end)
end)
local RANDOMLIST = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
function RandPlate()
math.randomseed( os.time() )
local atime = math.random(1,35)
local btime = math.random(1,35)
local ctime = math.random(1,35)
local result = RANDOMLIST[atime] .. RANDOMLIST[btime] .. RANDOMLIST[ctime]
return result
end
NB : No support it’s always for share and it’s my last proposal for this script because i haven’t more idea, enjoy 