Added pvp to esx, fixes #302

This commit is contained in:
ElPumpo
2019-10-13 19:18:22 +02:00
parent 663dce307f
commit 0e5dda5779
2 changed files with 7 additions and 3 deletions
+6 -3
View File
@@ -72,9 +72,12 @@ AddEventHandler('playerSpawned', function()
TriggerEvent('esx:restoreLoadout') -- restore loadout
isLoadoutLoaded = true
isPlayerSpawned = true
isDead = false
isLoadoutLoaded, isPlayerSpawned, isDead = true, true, false
if Config.EnablePvP then
SetCanAttackFriendly(playerPed, true, false)
NetworkSetFriendlyFireOption(true)
end
end)
AddEventHandler('esx:onPlayerDeath', function()