01.02.2012, 09:49
Not exactly, but you could create an array of how many bullets are in a magazine for each weapon, then detect WEAPON_STATE_RELOADING or weapon switches.
https://sampwiki.blast.hk/wiki/GetPlayerWeaponState
I made this array a while ago:
-1 means that weapon is invalid
0 means it doesn't have ammo i.e. a baseball bat
1 means it has 1 ammo, such as grenades or RPGs
anything above that is the magazine size.
NOTE: I think ammo will be different depending on skill, you'll have to check.
https://sampwiki.blast.hk/wiki/GetPlayerWeaponState
I made this array a while ago:
pawn Код:
new weapon_capacity[] = { // 0-no ammo 1-any ammo else-min ammo
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
-1,
-1,
-1,
34,
17,
7,
1,
4,
7,
100,
30,
30,
50,
100,
1,
1,
1,
1,
50,
500,
1,
0,
500,
500,
36,
0,
0,
0
};
0 means it doesn't have ammo i.e. a baseball bat
1 means it has 1 ammo, such as grenades or RPGs
anything above that is the magazine size.
NOTE: I think ammo will be different depending on skill, you'll have to check.