Timer on command
#10

Quote:
Originally Posted by VonLeeuwen
Just a few improvements on your script, Gagletz,

Код:
new timertest[MAX_PLAYERS]; // on top
forward Timer1(playerid); // on top


// at the onplayercommandtext callback:
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;
	}

//The timer, new callback:

public Timer1(playerid)
{
    if (timertest[playerid] == 1)
    {
    timertest[playerid] = 0;
    }
    return 1; // return 1 - or mybe not.. dnt know :D
}
You rock! Just gotta make it a bit better, then it's perfect! Thanks man.
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: 3 Guest(s)