mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
Create events.lua
This commit is contained in:
24
client/events.lua
Normal file
24
client/events.lua
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
RegisterNetEvent("ND:returnCharacters", function(characters)
|
||||||
|
NDCore.Characters = characters
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- updates the money on the client.
|
||||||
|
RegisterNetEvent("ND:updateMoney", function(cash, bank)
|
||||||
|
NDCore.SelectedCharacter.cash = cash
|
||||||
|
NDCore.SelectedCharacter.bank = bank
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Sets main character.
|
||||||
|
RegisterNetEvent("ND:setCharacter", function(character)
|
||||||
|
NDCore.SelectedCharacter = character
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Update main character info.
|
||||||
|
RegisterNetEvent("ND:updateCharacter", function(character)
|
||||||
|
NDCore.SelectedCharacter = character
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Updates last lcoation.
|
||||||
|
RegisterNetEvent("ND:updateLastLocation", function(location)
|
||||||
|
NDCore.SelectedCharacter.lastLocation = location
|
||||||
|
end)
|
||||||
Reference in New Issue
Block a user