diff --git a/ND_Core/client/main.lua b/ND_Core/client/main.lua index 64777c7..bca3903 100644 --- a/ND_Core/client/main.lua +++ b/ND_Core/client/main.lua @@ -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) \ No newline at end of file