Files
ND_Core/client/events.lua
Andyyy7666 9a9fa03e8a Revert "a lot of changes"
This reverts commit bf9604e851.
2023-07-10 02:37:54 +02:00

32 lines
922 B
Lua

RegisterNetEvent("ND:returnCharacters", function(characters)
NDCore.Characters = characters
end)
-- updates the money on the client.
RegisterNetEvent("ND:updateMoney", function(cash, bank)
NDCore.player.cash = cash
NDCore.player.bank = bank
end)
-- Sets main character.
RegisterNetEvent("ND:setCharacter", function(character)
NDCore.player = character
end)
-- Update main character info.
RegisterNetEvent("ND:updateCharacter", function(character)
NDCore.player = character
end)
-- Updates last lcoation.
RegisterNetEvent("ND:updateLastLocation", function(location)
if not NDCore.player then return end
NDCore.player.lastLocation = location
end)
-- Enable pvp for players.
AddEventHandler("playerSpawned", function()
print("^0ND Framework support discord: ^5https://discord.gg/Z9Mxu72zZ6")
SetCanAttackFriendly(PlayerPedId(), true, false)
NetworkSetFriendlyFireOption(true)
end)