mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Ped firing Projectiles doesn't work

Open ArranTuna opened this issue 7 years ago • 1 comments

Describe the bug When creating a ped with grenades or a rocket launcher, which then gets the command to fire like: setPedControlState(ped, "fire", true) -- grenades or setPedControlState(ped, "aim_weapon", true) -- rocket setPedControlState(ped, "fire", true) -- launcher

then the ped does the firing animation, but no projectile seems to be created.

I was testing on a server alone, so I was definitely the syncer of the ped. I didn't know if I should mark it as "Server-side-bug", as it could be a sync-problem, but as the ped's control state changes client-side, it's marked as that.

To reproduce crun setElementPosition(localPlayer, 2490.432, -1678.614, 13.33) srun a = createPed(0, 2488, -1676, 13) srun giveWeapon(a, 16, 100, true) crun setPedControlState(getElementsByType("ped")[1], "fire", true) -- Ped throws a grenade but no projectile is created.

Expected behaviour For a projectile to be created.

Version Both v1.5.6-release-14414

Additional context asturel: afaik peds cant create elements (such as projectiles) anyway u can script this with createProjectile (using nearest player as creator)

NeXTreme: The projectile (rockets in this case) will go in the direction the creator is "facing". Therefore if you use some localPlayer as the creator of that projectile, it will go in the direction that player is facing.

From https://bugs.mtasa.com/view.php?id=5725

ArranTuna avatar Sep 27 '18 19:09 ArranTuna

Not yet resolved

Dryxio avatar Jun 09 '25 11:06 Dryxio