Open ArranTuna opened 6 years ago
setPedDucked
as a counterpart for isPedDucked sounds fine to me
This is because you have to "Release" the crouch button again, a 50ms timer should do this. It is the same when you keep crouch key pressed, the player will stand up again after a short time.
crun ped1 = createPed(101, getElementPosition(localPlayer))
crun setPedControlState(ped1, 'crouch', true) --> No Effect
crun setPedControlState(ped1, 'crouch', true) setPedControlState(ped1, 'crouch', false) --> No Effect
crun setPedControlState(ped1, 'crouch', true) setTimer(setPedControlState, 50, 1, ped1, 'crouch', false) --> No Effect
crun setPedControlState(ped1, 'crouch', false) setPedControlState(ped1, 'crouch', true) setTimer(setPedControlState, 50, 1, ped1, 'crouch', false) --> No Effect
crun setPedControlState(ped1, 'crouch', false) setPedControlState(ped1, 'crouch', true) --> No Effect
Am I doing something wrong? The timer suggested isn't a working solution. The best effect is when the ped tries to crouch but the action is somehow canceled.
crun ped1 = createPed(101, getElementPosition(localPlayer)) crun setPedControlState(ped1, "crouch", true) setTimer(setPedControlState, 50, 1, ped1, "crouch", false)
---> this works for me.
Nope, tried again, doesn't work for me.
I'm on GTA Steam Version, using MTA 1.5.6-9.16588.5
Describe the bug Cannot make ped crouch. When using 'setPedControlState' he will start crouching for a few milliseconds and stops.
To Reproduce
Also you can reproduce it by set control 'crouch' state to 'true' and set it to 'false' after 100 ms.
Expected behavior Ped should stay crouched as there is no way to keep a ped crouched.
MTA Client: 1.5.3
MTA Server: 1.5.3
Additional context From https://bugs.mtasa.com/view.php?id=9495