AddEventHandler.... not needed <3

This commit is contained in:
WLVF
2022-09-01 04:11:48 -04:00
parent 803727e4e0
commit 7f153e72b2
14 changed files with 33 additions and 66 deletions

View File

@@ -58,27 +58,23 @@ if config.customPauseMenu then
end)
end
RegisterNetEvent("ND:returnCharacters")
AddEventHandler("ND:returnCharacters", function(characters)
RegisterNetEvent("ND:returnCharacters", function(characters)
NDCore.Characters = characters
end)
-- updates the money on the client.
RegisterNetEvent("ND:updateMoney")
AddEventHandler("ND:updateMoney", function(cash, bank)
RegisterNetEvent("ND:updateMoney", function(cash, bank)
NDCore.SelectedCharacter.cash = cash
NDCore.SelectedCharacter.bank = bank
end)
-- Sets main character.
RegisterNetEvent("ND:setCharacter")
AddEventHandler("ND:setCharacter", function(character)
RegisterNetEvent("ND:setCharacter", function(character)
NDCore.SelectedCharacter = character
end)
-- Updates last lcoation.
RegisterNetEvent("ND:updateLastLocation")
AddEventHandler("ND:updateLastLocation", function(location)
RegisterNetEvent("ND:updateLastLocation", function(location)
NDCore.SelectedCharacter.lastLocation = location
end)