View Issue Details

IDProjectCategoryView StatusLast Update
0009664Multi Theft Auto : San AndreasClientpublic2018-02-20 23:49
ReporterarranTuna Assigned ToNecktrox  
Status resolvedResolutionfixed 
Target Version1.5.6Fixed in Version1.5.6 
Summary0009664: There is no way to see if a ped is reloading

I'm trying to fix an exploit that allows quicker reloading and I just realised there is no way to see if a ped is reloading. I use the example code here: to see all running tasks and I was shocked to notice that for some reason there is no task for when you reload a weapon. There is no task, there is no function, nothing. It's impossible to know if a ped is reloading even though it's such an important (and exploitable) task.

I thought that any movement that isn't done with setPedAnimation, is a task. So it's really weird that GTA SA doesn't seem to have it as a task unless an MTA bug has caused it to not appear in getPedTask.

Additional Information

To see if a player is on fire there's isPedOnFire but also getPedTask(localPlayer, "secondary", 4) returns "TASK_SIMPLE_PLAYER_ON_FIRE" so there's 2 ways to see if a player's on fire but 0 ways to see if a player is reloading.

TagsNo tags attached.



2017-06-22 22:45

reporter   ~~0026037

I worked around that by entirely removing any inbuilt reload function and made my own reload system with giveWeapon + setPedAnimation, this is the only reliable way.
But you come to another issue because its impossible to walk + reload like in default GTA, because blendPedAnimation is disabled.


2017-06-27 14:13

viewer   ~~0026041

NOTE: That is just my idea, didn't tested that. Can anyone build it?

bool CClientPed::IsReloadingWeapon(void)
CWeapon * pWeapon = GetWeapon();

if (pWeapon->GetState() == WEAPONSTATE_RELOADING)
    return true;

return false;



2017-06-27 14:15

viewer   ~~0026042

I think that isn't bug. Reloading is weapon state, not player task(handled in mta by pWeapon->SetState(WEAPONSTATE_RELOADING);). Sorry for double post, just forgot to send that. :)


2017-06-27 18:50

viewer   ~~0026043

Waiting for review and merge in:


2017-06-27 23:14

reporter   ~~0026044

For some reason we currently have a whopping 23 pull requests and nothing of that stuff is added.


2018-02-18 17:41

manager   ~~0026434

Fixed in

Issue History

Date Modified Username Field Change