05.12.2011, 12:46
Hi all 
I have a small problem, I want, when player choose item (In menu) for filling all weapons with ammo, it fill all weapons but there is a little 'bug', ex. I have 3 guns, eagle (id 24), sniper (id 34), minigun (id 3
, it will fill all weapons with +1000 ammo but it will take ammo from last gun, so on this example, minigun have 500 ammo, it will give all weapons +1500 ammo, not 1000, understand?

I have a small problem, I want, when player choose item (In menu) for filling all weapons with ammo, it fill all weapons but there is a little 'bug', ex. I have 3 guns, eagle (id 24), sniper (id 34), minigun (id 3

pawn Код:
for(new i = 0; i < 13; i++)
{
GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
if(IsFirearm(weapons[i][0]))
{
GivePlayerWeapon(playerid, weapons[i][0], weapons[i][1] + 1000);
}
}