From 0cbe2fa5104124e5817720dccdd94a7d7c7377cd Mon Sep 17 00:00:00 2001 From: Andyyy7666 <86536434+Andyyy7666@users.noreply.github.com> Date: Tue, 4 Oct 2022 00:31:22 +0200 Subject: [PATCH] Create events.lua --- client/events.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 client/events.lua diff --git a/client/events.lua b/client/events.lua new file mode 100644 index 0000000..d2a034f --- /dev/null +++ b/client/events.lua @@ -0,0 +1,24 @@ +RegisterNetEvent("ND:returnCharacters", function(characters) + NDCore.Characters = characters +end) + +-- updates the money on the client. +RegisterNetEvent("ND:updateMoney", function(cash, bank) + NDCore.SelectedCharacter.cash = cash + NDCore.SelectedCharacter.bank = bank +end) + +-- Sets main character. +RegisterNetEvent("ND:setCharacter", function(character) + NDCore.SelectedCharacter = character +end) + +-- Update main character info. +RegisterNetEvent("ND:updateCharacter", function(character) + NDCore.SelectedCharacter = character +end) + +-- Updates last lcoation. +RegisterNetEvent("ND:updateLastLocation", function(location) + NDCore.SelectedCharacter.lastLocation = location +end)