11.07.2012, 20:43
do pGunAmmo[13]
pGun[13]
use like PlayerInfo[playerid][pGunAmmo][0] , PlayerInfo[playerid][pGun][0]
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;
}