From 9e18a0f0c45939c3e5676fd4efa1d58476cafc54 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sun, 15 Apr 2018 01:41:37 +0200 Subject: [PATCH] Moved anti-combat to config (enabled by default) --- client/main.lua | 8 ++++++++ config.lua | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index 9212e52c..ee310ab7 100644 --- a/client/main.lua +++ b/client/main.lua @@ -893,6 +893,14 @@ Citizen.CreateThread(function() end end) +RegisterNetEvent('esx_ambulancejob:requestDeath') +AddEventHandler('esx_ambulancejob:requestDeath', function() + if Config.AntiCombatLog then + Citizen.Wait(5000) + SetEntityHealth(GetPlayerPed(-1), 0) + end +end) + -- Load unloaded IPLs Citizen.CreateThread(function() LoadMpDlcMaps() diff --git a/config.lua b/config.lua index baaecda1..2f8efb28 100644 --- a/config.lua +++ b/config.lua @@ -2,8 +2,8 @@ Config = {} Config.DrawDistance = 100.0 Config.MarkerColor = { r = 102, g = 0, b = 102 } Config.MarkerSize = { x = 1.5, y = 1.5, z = 1.0 } -Config.ReviveReward = 700 - +Config.ReviveReward = 700 -- revive reward, set to 0 if you don't want it enabled +Config.AntiCombatLog = true -- enable anti-combat logging? local second = 1000 local minute = 60 * second