14.03.2015, 13:50
Set up a timer like this:
pawn Код:
forward MyTimer();
public MyTimer()
{
new ammo[13]; // Create an array called "ammo" with the size of 13
foreach(new i : Player) // Loops through all online players (requires the foreach include)
{
for(new o = 0; o <= 12; o++) // Loops 12 times
{
GetPlayerWeaponData(playerid, o, ammo[o], ammo[o]);
// Each time it loops, store the weapon in the array "ammo", then store the ammo in the array "ammo" instead
// Because we don't need the weapon, so we just replace with the ammo
if(ammo[o] > 200) Ban(i); // If "ammo" is higher than 200, ban the player
}
}
}