saving weapon ammo problem
#1

Код:
public SaveAmmo(playerid)
{
    new weapon, ammo, gun;
    GetPlayerWeaponData(playerid, gun, weapon, ammo);
    switch(gun)
    {
    	case 0:
        {
            PlayerInfo[playerid][pGunAmmo0] = ammo;
        }
       	case 1:
        {
            PlayerInfo[playerid][pGunAmmo1] = ammo;
        }
       	case 2:
        {
            PlayerInfo[playerid][pGunAmmo2] = ammo;
        }
        case 3:
        {
            PlayerInfo[playerid][pGunAmmo3] = ammo;
        }
        case 4:
        {
            PlayerInfo[playerid][pGunAmmo4] = ammo;
        }
        case 5:
        {
            PlayerInfo[playerid][pGunAmmo5] = ammo;
        }
        case 6:
        {
            PlayerInfo[playerid][pGunAmmo6] = ammo;
        }
        case 7:
        {
            PlayerInfo[playerid][pGunAmmo7] = ammo;
        }
        case 8:
        {
            PlayerInfo[playerid][pGunAmmo8] = ammo;
        }
        case 9:
        {
            PlayerInfo[playerid][pGunAmmo9] = ammo;
        }
        case 10:
        {
            PlayerInfo[playerid][pGunAmmo10] = ammo;
        }
        case 11:
        {
            PlayerInfo[playerid][pGunAmmo11] = ammo;
        }
        case 12:
        {
            PlayerInfo[playerid][pGunAmmo12] = ammo;
        }
    }
    return 1;
}
I recreated the code, but it still doesnt work. Look above Thanks

IT is still setting each variable as 0... why??!!
Reply


Messages In This Thread
saving weapon ammo problem - by lewismichaelbbc - 11.07.2012, 19:53
Re: saving weapon ammo problem - by lewismichaelbbc - 11.07.2012, 20:10
Re: saving weapon ammo problem - by Joe Staff - 11.07.2012, 20:42
Re: saving weapon ammo problem - by Cypress - 11.07.2012, 20:43

Forum Jump:


Users browsing this thread: 3 Guest(s)