- 0
Problema Anti-Spam
-
Similar Content
-
- 5 replies
- 199 views
-
- 6 answers
- 76 views
-
- 0 answers
- 76 views
-
- 0 replies
- 32 views
-
- 3 replies
- 70 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
diablo16
Salut as avea si eu nevoie de ajutor la anti-spam , este facut ca innainte sa dea kick playerului care spameaza , sa-i dea un mesaj. As vrea sa nu mai dea kick atunci cand spameaza intruna ci sa-i apara numai lui mesaj cv de genu ca in ss : http://img713.imageshack.us/img713/8329/samp003sj.png
>>>> Aici este FS :
/*
# ========================= #
# SA-MP Simple Anti-Spam #
# ------------------------- #
# @Authour(s): ChristopherM #
# ========================= #
*/
#include <a_samp>
forward ResetCount(playerid);
forward ResetCommandCount(playerid);
#define SpamLimit (3000)
public OnFilterScriptInit()
{
printf("[*] ChristopherM's Anti-Spam Loaded. Limit: %d", SpamLimit);
return 1;
}
public OnFilterScriptExit()
{
print("[*] ChristopherM's Anti-Spam Unloaded.");
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-Spam]: Warning you are one message away from being kicked!");
}
else if(TCount == 3) {
GetPlayerName(playerid, KMessage, sizeof(KMessage));
format(KMessage, sizeof(KMessage), "[Anti-Spam]: %s has been kicked for chat spamming.", 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-Spam]: Warning you are one command away from being kicked!");
}
else if(TCount == 3) {
GetPlayerName(playerid, KMessage, sizeof(KMessage));
format(KMessage, sizeof(KMessage), "[Anti-Spam]: %s has been kicked for command spamming.", 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);
}
>>>>> Va rog ajutati-ma !
Link to comment
Share on other sites
2 answers to this question
Recommended Posts