Help :S OOC FLOOD :S
#1

I need that player wait 2 seconds between ooc messages I made that but it only says Please try again later 2 seconds later! ant I cant write text again :S

Код:
forward OOCFLOOD();
Код:
new AFLOOD = 1;
Код:
new FLOOD = 20000;
Код:
//----------------------------------[ooc]-----------------------------------------------
	if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(gPlayerLogged[playerid] == 0)
	    {
	      SendClientMessage(playerid, COLOR_GREY, "You havent logged in yet !");
	      return 1;
	    }
			if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "OOC Is Disabled By Admin!");
				return 1;
			}
			if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, " You Are Muted!");
				return 1;
			}
			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, "USAGE: (/o)oc [ooc chat]");
				return 1;
			}
			if ((!AFLOOD) && (PlayerInfo[playerid][pAdmin] < 1))
			{
				format(string, sizeof(string), "Please try again later %d seconds Later!", (FLOOD/10000));
				SendClientMessage(playerid, COLOR_YELLOW, string);
				return 1;

			}
			format(string, sizeof(string), "[OOC] %s: %s " , sendername, result);
			OOCOff(COLOR_OOC,string);
			printf("%s", string);
			if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("OOCFLOOD", FLOOD, 0);AFLOOD = 0;}
			}
		return 1;
	}
it is my OOC can you help me?
Reply


Messages In This Thread
Help :S OOC FLOOD :S - by qwqwqw - 03.05.2010, 12:11
Re: Help :S OOC FLOOD :S - by Peep - 03.05.2010, 13:28
Re: Help :S OOC FLOOD :S - by pierhs - 03.05.2010, 13:43

Forum Jump:


Users browsing this thread: 1 Guest(s)