mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 02:08:55 +00:00
Refactor (esx_example (client &server )): Fix Formatting and add useful prints
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
RegisterNetEvent('esx:playerLoaded') -- Store the players data
|
||||
AddEventHandler('esx:playerLoaded', function(xPlayer, isNew)
|
||||
print("Player Loaded. New | " .. isNew)
|
||||
ESX.PlayerData = xPlayer
|
||||
ESX.PlayerLoaded = true
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx:playerLogout') -- When a player logs out (multicharacter), reset their data
|
||||
AddEventHandler('esx:playerLogout', function(xPlayer, isNew)
|
||||
AddEventHandler('esx:playerLogout', function()
|
||||
ESX.PlayerLoaded = false
|
||||
ESX.PlayerData = {}
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user