[Release] Damaged walkmode

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

just put the code snippet into a client.lua
its too little to make it as a resource…
if you really want to make a resource wait for it… ill post tonight a link with one ok…

ok thanks

DamageWalkMode.rar (604 Bytes)

There you go
Enjoy

I edit the download… Download again… 2019-01-29 19:08

Didnt let met edit the download… here we go…

DamageWalkMode.rar (604 Bytes)

1 Like

resource loaded but when i get shot or hurt in general i keep walking normal. is this related to the freeroam resource ?

@sixsens thankyou so much :smiley:

1 Like

Same here.

works fine for me in my server

uploaded new version.

https://github.com/Molozov/Damagedwalkmode

Thankss

I just saw this script blocks the “move_” animations. So you cannot change the walking style with this script running. Can someone fix this?

the link is broken