Set ammo in a magazine.
#4

pawn Код:
GetWeaponMagazineAmmo(weaponid)
{
    switch (weaponid)
    {
        case 22: return 34;
        case 23: return 17;
        case 24: return 7;
        case 26: return 4;
        case 27: return 7;
        case 28: return 100;
        case 29: return 30;
        case 30: return 30;
        case 31: return 50;
        case 32: return 100;
        case 38: return 500;
    }
    return -1;
}
The usage is: GetWeaponMagazineAmmo(weaponid) * how many magazines

An example to set to 46 magazines to your m4 weapon:
pawn Код:
SetPlayerAmmo(playerid, WEAPON_M4, GetWeaponMagazineAmmo(WEAPON_M4) * 46);
which makes it 2300-46
Reply


Messages In This Thread
Set ammo in a magazine. - by Dayrion - 09.08.2016, 04:36
Re: Set ammo in a magazine. - by Shinja - 09.08.2016, 10:49
Re: Set ammo in a magazine. - by Dayrion - 09.08.2016, 11:20
Re: Set ammo in a magazine. - by Konstantinos - 09.08.2016, 11:31
Re: Set ammo in a magazine. - by Shinja - 09.08.2016, 11:36
Re: Set ammo in a magazine. - by Dayrion - 09.08.2016, 14:01
Re: Set ammo in a magazine. - by Konstantinos - 09.08.2016, 15:04
Re: Set ammo in a magazine. - by PrO.GameR - 09.08.2016, 15:06

Forum Jump:


Users browsing this thread: 1 Guest(s)