Timer on command
#3

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


Messages In This Thread
Timer on command - by Galcio - 24.02.2010, 10:24
Re: Timer on command - by aircombat - 24.02.2010, 10:36
Re: Timer on command - by GaGlets(R) - 24.02.2010, 10:44
Re: Timer on command - by Galcio - 24.02.2010, 11:00
Re: Timer on command - by Razvann - 24.02.2010, 11:02
Re: Timer on command - by Galcio - 24.02.2010, 11:06
Re: Timer on command - by VonLeeuwen - 24.02.2010, 11:07
Re: Timer on command - by MenaceX^ - 24.02.2010, 11:11
Re: Timer on command - by VonLeeuwen - 24.02.2010, 11:13
Re: Timer on command - by Galcio - 24.02.2010, 11:17
Re: Timer on command - by VonLeeuwen - 24.02.2010, 11:18
Re: Timer on command - by Gamer_Z - 24.02.2010, 11:43
Re: Timer on command - by GaGlets(R) - 24.02.2010, 11:46
Re: Timer on command - by Gamer_Z - 24.02.2010, 12:37
Re: Timer on command - by VonLeeuwen - 24.02.2010, 12:40
Re: Timer on command - by Galcio - 24.02.2010, 15:22
Re: Timer on command - by Galcio - 24.02.2010, 16:21
Re: Timer on command - by GaGlets(R) - 24.02.2010, 16:35
Re: Timer on command - by Galcio - 24.02.2010, 16:47
Re: Timer on command - by Joe Staff - 24.02.2010, 17:11
Re: Timer on command - by Galcio - 24.02.2010, 17:26
Re: Timer on command - by Gamer_Z - 25.02.2010, 05:42

Forum Jump:


Users browsing this thread: 1 Guest(s)