SA-MP Forums Archive
Timer to command. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Timer to command. (/showthread.php?tid=395908)



Timer to command. - dino_d_carter - 28.11.2012

Hey guys can somebody show me how to make a timer to this command like a player can only use the command evry 5min?

Код:
if(strcmp(cmdtext, "/park", true) == 0) 
{
	if(IsPlayerInRangeOfPoint(playerid, 50, 1645.7371,-2152.5457,13.5547))
  	{
		new m = GetVehicleModel(GetPlayerVehicleID(playerid));
		if (m == 525)
     	{
	    	if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
			{
  			DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
			SafeGivePlayerMoney(playerid,2000);
			SendClientMessage(playerid, COLOR_YELLOW2, "Message .");
   			return 1;
			}
			{
			SendClientMessage(playerid, COLOR_WHITE, "Message !!!");
			return 1;
			}
 		}
		SendClientMessage(playerid, COLOR_WHITE, "Message !!!");
		return 1;
	}
	SendClientMessage(playerid, COLOR_WHITE, "Message..!!!");
	return 1;
}