2022-10-04 00:31:22 +02:00
|
|
|
-- updates the money on the client.
|
|
|
|
|
RegisterNetEvent("ND:updateMoney", function(cash, bank)
|
2023-07-13 01:22:24 +02:00
|
|
|
if not NDCore.player then return end
|
2023-07-09 03:07:46 +02:00
|
|
|
NDCore.player.cash = cash
|
|
|
|
|
NDCore.player.bank = bank
|
2022-10-04 00:31:22 +02:00
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
-- Sets main character.
|
2023-07-13 01:22:24 +02:00
|
|
|
RegisterNetEvent("ND:characterLoaded", function(character)
|
2023-09-24 04:45:37 +02:00
|
|
|
NDCore.player = character
|
2022-10-04 00:31:22 +02:00
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
-- Update main character info.
|
|
|
|
|
RegisterNetEvent("ND:updateCharacter", function(character)
|
2023-09-24 04:45:37 +02:00
|
|
|
NDCore.player = character
|
2022-10-04 00:31:22 +02:00
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
-- Updates last lcoation.
|
|
|
|
|
RegisterNetEvent("ND:updateLastLocation", function(location)
|
2023-07-09 03:07:46 +02:00
|
|
|
if not NDCore.player then return end
|
|
|
|
|
NDCore.player.lastLocation = location
|
2022-10-04 00:31:22 +02:00
|
|
|
end)
|
2023-09-24 04:45:37 +02:00
|
|
|
|
|
|
|
|
RegisterNetEvent("ND:revivePlayer", function()
|
|
|
|
|
NDCore.revivePlayer(true)
|
|
|
|
|
end)
|
2024-02-04 16:44:55 +01:00
|
|
|
|
|
|
|
|
RegisterNetEvent("ND:characterUnloaded")
|