hekp with chat
#1

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

someone help me pliz
Reply
#2

Код:
// 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?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)