Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
ped = PlayerPedId()
if IsPedShooting(ped) then
TriggerEvent('esx_status:add', 'stress', 1000)
--exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 10000)
end
end
end)
basicneedsdeki kodu şu şekilde değiştirir misiniz ?hocam ekledim çalıştı evet ama ekran sallama olayı olmadı onu nasıl yapabilirim bir bilgin varmı ?
Citizen.CreateThread(function()
while true do
Citizen.Wait(1000)
local playerPed = PlayerPedId()
local prevHealth = GetEntityHealth(playerPed)
local health = prevHealth
local stressVal = 0
TriggerEvent('esx_status:getStatus', 'hunger', function(status)
if status.val == 0 then
if prevHealth <= 150 then
health = health - 5
else
health = health - 1
end
end
end)
TriggerEvent('esx_status:getStatus', 'thirst', function(status)
if status.val == 0 then
if prevHealth <= 150 then
health = health - 5
else
health = health - 1
end
end
end)
TriggerEvent('esx_status:getStatus', 'stress', function(status)
stressVal = status.val
end)
if health ~= prevHealth then
SetEntityHealth(playerPed, health)
end
if stressVal >= 750000 then
Citizen.Wait(5000)
ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.06)
exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000)
elseif stressVal >= 700000 then
Citizen.Wait(10000)
ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.03)
exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000)
elseif stressVal >= 600000 then
Citizen.Wait(15000)
ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.02)
exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000)
elseif stressVal >= 350000 then
Citizen.Wait(20000)
ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.01)
exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000)
end
end
end)
end)
ekledim fakat hala aynı ve stress arttı uyarısıda gelmiyor.basicneedsdeki kodu şu şekilde değiştirir misiniz ?
Kod:Citizen.CreateThread(function() while true do Citizen.Wait(1000) local playerPed = PlayerPedId() local prevHealth = GetEntityHealth(playerPed) local health = prevHealth local stressVal = 0 TriggerEvent('esx_status:getStatus', 'hunger', function(status) if status.val == 0 then if prevHealth <= 150 then health = health - 5 else health = health - 1 end end end) TriggerEvent('esx_status:getStatus', 'thirst', function(status) if status.val == 0 then if prevHealth <= 150 then health = health - 5 else health = health - 1 end end end) TriggerEvent('esx_status:getStatus', 'stress', function(status) stressVal = status.val end) if health ~= prevHealth then SetEntityHealth(playerPed, health) end if stressVal >= 750000 then Citizen.Wait(5000) ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.06) exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000) elseif stressVal >= 700000 then Citizen.Wait(10000) ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.03) exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000) elseif stressVal >= 600000 then Citizen.Wait(15000) ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.02) exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000) elseif stressVal >= 350000 then Citizen.Wait(20000) ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.01) exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000) end end end) end)
Citizen.CreateThread(function()
while true do
Wait(1000)
local playerPed = GetPlayerPed(-1)
local prevHealth = GetEntityHealth(playerPed)
local health = prevHealth
TriggerEvent('esx_status:getStatus', 'hunger', function(status)
if status.val == 0 then
if prevHealth <= 150 then
health = health - 5
else
health = health - 1
end
end
end)
TriggerEvent('esx_status:getStatus', 'thirst', function(status)
if status.val == 0 then
if prevHealth <= 150 then
health = health - 5
else
health = health - 1
end
end
end)
TriggerEvent('esx_status:getStatus', 'stress', function(status)
stressVal = status.val
end)
if health ~= prevHealth then
SetEntityHealth(playerPed, health)
end
if stressVal >= 750000 then
Citizen.Wait(2000)
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.12)
elseif stressVal >= 700000 then
Citizen.Wait(2000)
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.08)
elseif stressVal >= 600000 then
Citizen.Wait(2000)
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.05)
elseif stressVal >= 450000 then
Citizen.Wait(2000)
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.03)
elseif stressVal >= 250000 then
Citizen.Wait(2000)
ShakeGameplayCam('SMALL_EXPLOSION_SHAKE', 0.01)
end
end
end)
Serveri yeniden başlatmadan önce bayağı bi sıktım ve stress ful oldu yeniden başlattıktan sonra girdiğimde ekran sallanmaya başladı birde esx_basicneeds scriptini yeniden başlatınca ekran sallanması gitti ve sigara içince stress azalma olayı çalıştı script çok karışık bir hal aldı ne yapacağımı şaşırdımbasicneedsdeki kodu şu şekilde değiştirir misiniz ?
Kod:Citizen.CreateThread(function() while true do Citizen.Wait(1000) local playerPed = PlayerPedId() local prevHealth = GetEntityHealth(playerPed) local health = prevHealth local stressVal = 0 TriggerEvent('esx_status:getStatus', 'hunger', function(status) if status.val == 0 then if prevHealth <= 150 then health = health - 5 else health = health - 1 end end end) TriggerEvent('esx_status:getStatus', 'thirst', function(status) if status.val == 0 then if prevHealth <= 150 then health = health - 5 else health = health - 1 end end end) TriggerEvent('esx_status:getStatus', 'stress', function(status) stressVal = status.val end) if health ~= prevHealth then SetEntityHealth(playerPed, health) end if stressVal >= 750000 then Citizen.Wait(5000) ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.06) exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000) elseif stressVal >= 700000 then Citizen.Wait(10000) ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.03) exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000) elseif stressVal >= 600000 then Citizen.Wait(15000) ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.02) exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000) elseif stressVal >= 350000 then Citizen.Wait(20000) ShakeGameplayCam('LARGE_EXPLOSION_SHAKE', 0.01) exports['mythic_notify']:SendAlert('error', 'Stresiniz Arttı!', 3000) end end end) end)
Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!