24.02.2010, 10:44
Top of the script
OnPlayerCommandText (or smth like that - your cmd)
Botom of scipt - its already callback
Код:
new timertest[MAX_PLAYERS]; forward Timer1();
Код:
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; SetTimer("Timer1", 60000, false); } } return 1; }
Код:
public Timer1() { if (timertest[playerid] == 1) { timertest[playerid = 0; } return 1; // return 1 - or mybe not.. dnt know :D }