mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
feat(core): added update last location on client
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user