I would like to create a script that works like this but I can’t seem to figure it out. I have borrowed the timer.
Citizen.CreateThread(function()
while true do
Wait(0)
if HasPedBeenDamagedByWeapon(GetPlayerPed(-1), GetHashKey(“weapon_knife”), -1716189206) then
TaskStartScenarioInPlace(player, “move_crawlprone2crawlfront”, 0, false)
end
end
end)
Citizen.CreateThread(function()
local time = 10
while (time ~= 0) do
Wait( 1000 )
time = time - 1
end
SetEntityHealth(GetPlayerPed(-1), 0)
end)