Bullet Count
#2

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:

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
};
-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.
Reply


Messages In This Thread
Bullet Count - by No Fear - 01.02.2012, 09:48
Re: Bullet Count - by MP2 - 01.02.2012, 09:49
Re: Bullet Count - by 2KY - 01.02.2012, 13:14
Re: Bullet Count - by No Fear - 03.02.2012, 08:43
Re: Bullet Count - by T0pAz - 03.02.2012, 08:47
Re: Bullet Count - by wups - 03.02.2012, 08:48
Re: Bullet Count - by No Fear - 03.02.2012, 08:49
Re: Bullet Count - by No Fear - 03.02.2012, 08:57
Re: Bullet Count - by wups - 03.02.2012, 09:07
Re: Bullet Count - by No Fear - 03.02.2012, 09:13

Forum Jump:


Users browsing this thread: 5 Guest(s)