how to make report time limit cmd?
#1

Hi to all, i want when player send message, that he cant do it next 2 minutes. I have simple report cmd but how to make this i want?

here is cmd

Код:
if(strcmp(cmd, "/report", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
 			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Use: /report [text]");
				return 1;
			}
  			format(string, sizeof(string), "Report od %s: %s", sendername, (result));
			ABroadCast(COLOR_YELLOW,string,1);
			SendClientMessage(playerid, COLOR_YELLOW, "Your report message send to admins.");
	  }
	  return 1;
	}
So i need this

1. after one report, player cant send next report in next 2 minutes
2. if he try to send that get message " you must wait 2 minutes to send next report"

Can someone help me with this, make cmd for 2 minutes )

tnx a lot
Reply


Messages In This Thread
how to make report time limit cmd? - by buonggiorno - 11.01.2010, 08:15
Re: how to make report time limit cmd? - by [HiC]TheKiller - 11.01.2010, 08:20
Re: how to make report time limit cmd? - by buonggiorno - 11.01.2010, 08:25
Re: how to make report time limit cmd? - by jamesb93 - 11.01.2010, 08:35
Re: how to make report time limit cmd? - by buonggiorno - 11.01.2010, 08:39
Re: how to make report time limit cmd? - by jamesb93 - 11.01.2010, 08:41
Re: how to make report time limit cmd? - by buonggiorno - 11.01.2010, 08:44

Forum Jump:


Users browsing this thread: 1 Guest(s)