From f395ed7f6c3154db3e3d8b28d4a67188f2c9938c Mon Sep 17 00:00:00 2001 From: Andyyy7666 <86536434+Andyyy7666@users.noreply.github.com> Date: Thu, 11 Aug 2022 01:17:51 +0200 Subject: [PATCH] feat(core): added update last location on client --- ND_Core/client/main.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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