mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-18 14:26:03 +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
|
NDCore.SelectedCharacter.bank = bank
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- Sets main character.
|
||||||
RegisterNetEvent("ND:setCharacter")
|
RegisterNetEvent("ND:setCharacter")
|
||||||
AddEventHandler("ND:setCharacter", function(character)
|
AddEventHandler("ND:setCharacter", function(character)
|
||||||
NDCore.SelectedCharacter = character
|
NDCore.SelectedCharacter = character
|
||||||
end)
|
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.
|
-- Enables pvp if it's selected in the config.
|
||||||
AddEventHandler("playerSpawned", function()
|
AddEventHandler("playerSpawned", function()
|
||||||
if config.enablePVP then
|
if config.enablePVP then
|
||||||
@@ -82,4 +89,4 @@ AddEventHandler("playerSpawned", function()
|
|||||||
NetworkSetFriendlyFireOption(true)
|
NetworkSetFriendlyFireOption(true)
|
||||||
end
|
end
|
||||||
print("^0This framework is created by ^5Andyyy#7666 ^0for support you can join the ^5discord: ^0https://discord.gg/Z9Mxu72zZ6")
|
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