mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
29 lines
744 B
Lua
29 lines
744 B
Lua
-- updates the money on the client.
|
|
RegisterNetEvent("ND:updateMoney", function(cash, bank)
|
|
if not NDCore.player then return end
|
|
NDCore.player.cash = cash
|
|
NDCore.player.bank = bank
|
|
end)
|
|
|
|
-- Sets main character.
|
|
RegisterNetEvent("ND:characterLoaded", function(character)
|
|
NDCore.player = character
|
|
end)
|
|
|
|
-- Update main character info.
|
|
RegisterNetEvent("ND:updateCharacter", function(character)
|
|
NDCore.player = character
|
|
end)
|
|
|
|
-- Updates last lcoation.
|
|
RegisterNetEvent("ND:updateLastLocation", function(location)
|
|
if not NDCore.player then return end
|
|
NDCore.player.lastLocation = location
|
|
end)
|
|
|
|
RegisterNetEvent("ND:revivePlayer", function()
|
|
NDCore.revivePlayer(true)
|
|
end)
|
|
|
|
RegisterNetEvent("ND:characterUnloaded")
|