#include a_samp
public OnPlayerText(playerid, text[])
{
new str[128];
GetPVarString(playerid, "ASPAM", str, 128);
if(str[0] != ' ' && !strcmp(text, str, false))
{
new lol = GetTickCount();
new x = GetPVarInt(playerid, "ASPAMCOUNT");
if(x >= 2, GetTickCount() - lol < 5000)
{
SendClientMessage(playerid,-1,"* {A40000}Chwilowo zablokowano Ci mo?liwo?? pisania, odczekaj {FF7777}5 {A40000}sekund!");
}
else
{
SCM(playerid, -1, "* {A40000}Nie spam tym samym tekstem na czacie!");
SetPVarInt(playerid, "ASPAMCOUNT", x + 1);
}
}
else
SetPVarInt(playerid, "ASPAMCOUNT", 0);
SetPVarString(playerid, "ASPAM", text);
return 0;
}