esx_basicneeds/client/main.lua
Citizen.CreateThread(function() -- ateş etmek
while true do
Citizen.Wait(0)
ped = PlayerPedId()
if IsPedShooting(ped) then
TriggerEvent('esx_status:add', 'stress', 7500)
end
end
end)
Citizen.CreateThread(function() -- Nişan alırsa
while true do
local ped = PlayerPedId()
local status = GetPedConfigFlag(ped, 78, 1)
if status then
TriggerEvent('esx_status:add', 'stress', 5000)
Citizen.Wait(5000)
else
Citizen.Wait(1)
end
end
end)
Citizen.CreateThread(function() -- Elinde silah tutarsa
while true do
local ped = PlayerPedId()
local status = IsPedArmed(ped, 4)
if status then
TriggerEvent('esx_status:add', 'stress', 3500)
Citizen.Wait(15000)
else
Citizen.Wait(1)
end
end
end)
Citizen.CreateThread(function() -- Ateş ederken birine gelirse
while true do
local ped = PlayerPedId()
local status = IsPedShooting(ped)
local silenced = IsPedCurrentWeaponSilenced(ped)
if status and not silenced then
TriggerEvent('esx_status:add', 'stress', 5500)
Citizen.Wait(2000)
else
Citizen.Wait(1)
end
end
end)
İyi Günler Dilerim...