Wait 1 Second Before Typing Other Message - 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: Wait 1 Second Before Typing Other Message (
/showthread.php?tid=498667)
Wait 1 Second Before Typing Other Message -
Blackazur - 04.03.2014
Hello, how can i make something like if you type something you have to wait 1-2 seconds before sending a message again?
Re: Wait 1 Second Before Typing Other Message -
JR_Junior - 04.03.2014
Hello friend, this is the most efficient script:
pawn Код:
public OnPlayerText(playerid, text[])
{
if(gettime() - GetPVarInt(playerid,"PlayerLastText") < 2)
{
GameTextForPlayer(playerid, "~r~Wait ~w~1 ~r~second!", 2000, 3);
return 0;
}
SetPVarInt(playerid,"PlayerLastText",gettime());
}