saving weapon ammo problem
#4

do pGunAmmo[13]
pGun[13]

use like PlayerInfo[playerid][pGunAmmo][0] , PlayerInfo[playerid][pGun][0]


pawn Код:
stock SavePlayerWeaponsAndAmmo(playerid)
{
    new WeaponData[2];

    for (new i = 0; i < 13; i++)
    {
        GetPlayerWeaponData(playerid, i, WeaponData[0], WeaponData[1]);
        if(WeaponData[0] && WeaponData[1] && (WeaponData[1] < 65535 || !i || i == 1 || i == 10 || i == 12))
        {
           PlayerInfo[playerid][pGun][i] = WeaponData[0];
           PlayerInfo[playerid][pGunAmmo][i] = WeaponData[1];  
        }
        WeaponData[0] = 0;
        WeaponData[1] = 0;
    }
    return 1;
}
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: 1 Guest(s)