24.02.2010, 12:37
pawn Код:
new timertest[MAX_PLAYERS];
forward Timer1();
public OnFilterScriptInit(){
SetTimer("Timer1",59302,1);
return 1;
}
pawn Код:
if (strcmp("/usecanon", cmdtext, true, 9) == 0)
{
if (timertest[playerid] == 0)
{
if (IsPlayerInRangeOfPoint(playerid, 1, -1367.8082,-2327.3691,43.6029))
{
GivePlayerWeapon(playerid, 35, 1);
timertest[playerid] = 1;
}
}
return 1;
}
pawn Код:
public Timer1()
{
for(new playerid; playerid < MAX_PLAYERS;playerid++)
{
if (timertest[playerid] == 1)
{
timertest[playerid] = 0;
}
}
return 1;
}