feat(core): added update last location on client

This commit is contained in:
Andyyy7666
2022-08-11 01:17:51 +02:00
parent e66490274d
commit f395ed7f6c

View File

@@ -70,11 +70,18 @@ AddEventHandler("ND:updateMoney", function(cash, bank)
NDCore.SelectedCharacter.bank = bank
end)
-- Sets main character.
RegisterNetEvent("ND:setCharacter")
AddEventHandler("ND:setCharacter", function(character)
NDCore.SelectedCharacter = character
end)
-- Updates last lcoation.
RegisterNetEvent("ND:updateLastLocation")
AddEventHandler("ND:updateLastLocation", function(location)
NDCore.SelectedCharacter.lastLocation = location
end)
-- Enables pvp if it's selected in the config.
AddEventHandler("playerSpawned", function()
if config.enablePVP then
@@ -82,4 +89,4 @@ AddEventHandler("playerSpawned", function()
NetworkSetFriendlyFireOption(true)
end
print("^0This framework is created by ^5Andyyy#7666 ^0for support you can join the ^5discord: ^0https://discord.gg/Z9Mxu72zZ6")
end)
end)