SA-MP Forums Archive
hekp with chat - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: hekp with chat (/showthread.php?tid=71974)



hekp with chat - _ReloadeD_ - 05.04.2009

how i do that player can send 1 massage in 2 second?

someone help me pliz


Re: hekp with chat - dre$tA - 05.04.2009

Код:
// On Top Of The Script:
new bool:waiting[MAX_PLAYERS];
forward ResetWait(playerid);
//

public OnPlayerText(playerid, text[])
{// Under OnPlayerText callback
	if(waiting[playerid] == true)
	{
		SendClientMessage(playerid, 0xFF0000AA, "You need to wait 2 seconds between messages.");
		return 0;
	}
	waiting[playerid] = true;
	SetTimerEx("ResetWait", 2000, 0, "i", playerid);
	return 1;
}

// Anywhere
public ResetWait(playerid)
{
	waiting[playerid] = false;
}
I'm guessing you ment something like this?