04.03.2014, 16:20
Hello, how can i make something like if you type something you have to wait 1-2 seconds before sending a message again?
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());
}