Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --client
- Citizen.CreateThread(function()
- while true do
- Wait(30000)
- TriggerServerEvent('es_extended:saveLoadout',GetPlayerLoadout(PlayerPedId()))
- end
- end)
- --server
- local saveLoadout = {}
- Citizen.CreateThread(function()
- while true do
- Wait(60000)
- local players = ESX.GetPlayers()
- for i=1, #players, 1 do
- local xPlayer = ESX.GetPlayerFromId(players[i])
- if saveLoadout ~= xPlayer.loadout then
- --Ban event
- CancelEvent()
- break
- end
- end
- end
- end)
- RegisterNetEvent('es_extended:saveLoadout')
- AddEventHandler('es_extended:saveLoadout',function(loadout)
- saveLoadout[source] = loadout
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement