Start of ND 2.0

This commit is contained in:
Andyyy7666
2023-07-09 03:07:46 +02:00
parent 7a5f26834e
commit f4846617a3
14 changed files with 271 additions and 1266 deletions

View File

@@ -4,21 +4,29 @@ end)
-- updates the money on the client.
RegisterNetEvent("ND:updateMoney", function(cash, bank)
NDCore.SelectedCharacter.cash = cash
NDCore.SelectedCharacter.bank = bank
NDCore.player.cash = cash
NDCore.player.bank = bank
end)
-- Sets main character.
RegisterNetEvent("ND:setCharacter", function(character)
NDCore.SelectedCharacter = character
NDCore.player = character
end)
-- Update main character info.
RegisterNetEvent("ND:updateCharacter", function(character)
NDCore.SelectedCharacter = character
NDCore.player = character
end)
-- Updates last lcoation.
RegisterNetEvent("ND:updateLastLocation", function(location)
NDCore.SelectedCharacter.lastLocation = 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)