Készítõ : ChristopherM
Honnan Copyztam :
http://sampforum.hu/index.php?topic=14246.msg163465#msg163465 /*
# ========================= #
# SA-MP Simple Anti-Spam #
# ------------------------- #
# @Authour(s): ChristopherM #
# ========================= #
*/
//Honositotta Armani
#include <a_samp>
forward ResetCount(playerid);
forward ResetCommandCount(playerid);
#define SpamLimit (3000)
public OnFilterScriptInit()
{
printf(\"
- ChristopherM's Anti-Flood Betõltve. Limit: %d\", SpamLimit);
return 1;
}
public OnFilterScriptExit()
{
print(\"
- ChristopherM's Anti-Flood Kifagyva.\");
return 1;
}
public OnPlayerText(playerid, text[])
{
new TCount, KMessage[128];
TCount = GetPVarInt(playerid, \"TextSpamCount\");
TCount++;
SetPVarInt(playerid, \"TextSpamCount\", TCount);
if(TCount == 2) {
SendClientMessage(playerid, 0xFFFFFF, \"[Anti-Flood]: Figyelmeztetést kaptál mert floodolsz hagyd abba vagy következö KICK!\");
}
else if(TCount == 3) {
GetPlayerName(playerid, KMessage, sizeof(KMessage));
format(KMessage, sizeof(KMessage), \"[Anti-Flood]:%s Kickelve lett mert Floodolt\", KMessage);
SendClientMessageToAll(0xFFFFFF, KMessage);
print(KMessage);
Kick(playerid);
}
SetTimerEx(\"ResetCount\", SpamLimit, false, \"i\", playerid);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new TCount, KMessage[128];
TCount = GetPVarInt(playerid, \"CommandSpamCount\");
TCount++;
SetPVarInt(playerid, \"CommandSpamCount\", TCount);
if(TCount == 2) {
SendClientMessage(playerid, 0xFFFFFF, \"[Anti-Flood]: Figyelmeztetést kaptál mert floodolsz hagyd abba vagy következö KICK!\");
}
else if(TCount == 3) {
GetPlayerName(playerid, KMessage, sizeof(KMessage));
format(KMessage, sizeof(KMessage), \"[Anti-Flood]:%s Kickelve lett mert Floodolt\", KMessage);
SendClientMessageToAll(0xFFFFFF, KMessage);
print(KMessage);
Kick(playerid);
}
SetTimerEx(\"ResetCommandCount\", SpamLimit, false, \"i\", playerid);
}
public ResetCount(playerid)
{
SetPVarInt(playerid, \"TextSpamCount\", 0);
}
public ResetCommandCount(playerid)
{
SetPVarInt(playerid, \"CommandSpamCount\", 0);
}
Sorry Lu$ta
Nem szégyen Respectelni xd