[Release] Damaged walkmode

This resource breaks other resources that let you do /crouch is there any fix for this?

im on it… gimme the night… and il post a new version of it

1 Like

i struggle a bit… ill maybe put the function nothurt in the bandage and revive script… to load only once when healed … another day of testing.
sorry not fix yet

what i try is to stop the loop from reset if the player was already reset… this way when we are not hurt anymore and been reset we can use other attitude walk…

i know the wait time can help but still… thw loop will start again and no more set animation will work after the wait…

ResetPedMovementClipset(GetPlayerPed(-1)) ResetPedWeaponMovementClipset(GetPlayerPed(-1)) ResetPedStrafeClipset(GetPlayerPed(-1))

how can we possibly reset once and let the loop look if we eventually hurt again.

how do we fix so that you can crouch with this?

How Can I install this?

Pfann how do u do this cool UI?

Here for the new year a fix for you guys

Soo… When you walk and not hurt… you can change animation like crouch…
But when hurt… it stuck to the injured animation…
i made it like that so if someone hurt he have to get heal.
note that 159= 59% of health
and 160=60% of health
change them for your own needs

local hurt = false
Citizen.CreateThread(function()
while true do
Wait(0)
if GetEntityHealth(GetPlayerPed(-1)) <= 159 then
setHurt()
elseif hurt and GetEntityHealth(GetPlayerPed(-1)) > 160 then
setNotHurt()
end
end
end)

function setHurt()
hurt = true
RequestAnimSet(“move_m@injured”)
SetPedMovementClipset(GetPlayerPed(-1), “move_m@injured”, true)
end

function setNotHurt()
hurt = false
ResetPedMovementClipset(GetPlayerPed(-1))
ResetPedWeaponMovementClipset(GetPlayerPed(-1))
ResetPedStrafeClipset(GetPlayerPed(-1))
end

2 Likes

i get an error!

Cool! I love errors

ill look everything again tonight…
mini work pretty well…
let me check that again

post me the error please

the problem is ” they need to be "

did tou fix… it… was working on my server with "
thx

local hurt = false
Citizen.CreateThread(function()
while true do
Wait(0)
if GetEntityHealth(GetPlayerPed(-1)) <= 159 then
setHurt()
elseif hurt and GetEntityHealth(GetPlayerPed(-1)) > 160 then
setNotHurt()
end
end
end)

function setHurt()
hurt = true
RequestAnimSet(“move_m@injured”)
SetPedMovementClipset(GetPlayerPed(-1), “move_m@injured”, true)
end

function setNotHurt()
hurt = false
ResetPedMovementClipset(GetPlayerPed(-1))
ResetPedWeaponMovementClipset(GetPlayerPed(-1))
ResetPedStrafeClipset(GetPlayerPed(-1))
end


can someone try this please
sorry i edit again… now its ok

the problem is ” they need to be "

but when i copy the code…
those come back… ” they need to be "
thx Patrick Kall

the problem is my cellphone …
sorry guys… i was struggling with it…
was a character parsing error…
i put the code on pastebin here:

https://pastebin.com/yzMbTEk0

for some reason this will not work on my server at all. I have tried many ways to get it to work.

Just add below code to any client script and call it a day


Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		if GetEntityHealth(GetPlayerPed(-1)) <= 159 then
		setHurt()
		elseif hurt and GetEntityHealth(GetPlayerPed(-1)) > 160 then
		setNotHurt()
		end
	end
end)

function setHurt()
hurt = true
	RequestAnimSet('move_m@injured')
	SetPedMovementClipset(GetPlayerPed(-1), 'move_m@injured', true)
end

function setNotHurt()
hurt = false
        ResetPedMovementClipset(GetPlayerPed(-1))
	ResetPedWeaponMovementClipset(GetPlayerPed(-1))
	ResetPedStrafeClipset(GetPlayerPed(-1))
end

here the code without error:

https://pastebin.com/yzMbTEk0

how does one make it into a resource