01.04.2013, 16:20
У меня вот такая конструкция.
PHP код:
stock const WeaponSlot[47]=
{
0,0,1,1,1,1,1,1,
1,1,10,10,10,10,10,10,
8,8,8,0,0,0,2,2,
2,3,3,3,4,4,5,5,
4,6,6,7,7,7,7,8,
12,9,9,9,11,11,11
};
PHP код:
new ammo,weaponid=GetPlayerWeapon(playerid);
new k=WeaponSlot[weaponid];
if(weaponid != Weapons[playerid]{k})
{
if(weaponid != AntiWeapons[playerid]{k})
{
if(AntiWeaponsCheck[playerid]{k} == 0)//таймер
{
//OnPlayerCommandText(playerid, "/kill");
printf("Weapone %d %d",playerid,weaponid);
}
return 0;
}
else
{
}
}
if(15 < weaponid < 44)
{
GetPlayerWeaponData(playerid, k, weaponid, ammo);
if(ammo > Ammo[playerid][k])
{
if(ammo > AntiAmmo[playerid][k])
{
if(AntiAmmoCheck[playerid]{k} == 0)//таймер
{
//OnPlayerCommandText(playerid, "/kill");
print("Ammo");
}
return 0;
}
else
{
}
}
else
if(ammo < Ammo[playerid][k])
{
}
}