04.05.2018, 11:03
Hi all
I tried many spam scripts but none help me.
Please help me to making a good anti spam script.
I can show you my script:-
ifPlayerinfo[playerid][Level] == 0)
{
ifPlayerinfo[playerid][SpamCount] == 0) Playerinfo[playerid][SpamTime] = gettime();
Playerinfo[playerid][SpamCount]++;
ifPlayerinfo[playerid][SpamCount] == SPAM_MAX_MSGS)
{
new name[24];
new string[200];
GetPlayerName(playerid,name,24);
format(string,sizeof(string),"%s (%d) has been muted for %d Minutes. Reason: Spam.", name, playerid, AutoUnmuteTime);
SendClientMessageToAll(ADMINCOLOR,string);
SendClientMessage(playerid,red,"* Spam level reached, You have received your final warning (3/3)! Reason: Spam.");
Playerinfo[playerid][Muted] = 1;
SetTimerEx("AutoUnMute",AutoUnmuteTime*60000,false ,"i",playerid);
}
else if(gettime() - Playerinfo[playerid][SpamTime] > SPAM_TIMELIMIT) // All Variables set to 0 if interval of time in player messages is long
{
Playerinfo[playerid][SpamCount] = 0;
Playerinfo[playerid][SpamTime] = gettime();
}
if(gettime() - Playerinfo[playerid][SpamTime] < SPAM_TIMELIMIT)
{
new string[200];
Line 687- format(string,sizeof(string),"* "COL_RED"Warning received (%d/%d)! Reason: Spam.",SpamCount,SPAM_MAX_MSGS);
SendClientMessage(playerid,white,string);
}
return 0;
}
It can't work for me, Help me pls and line 687 give tag mismatch warning how to fix this.
Thank You.
I tried many spam scripts but none help me.
Please help me to making a good anti spam script.
I can show you my script:-
ifPlayerinfo[playerid][Level] == 0)
{
ifPlayerinfo[playerid][SpamCount] == 0) Playerinfo[playerid][SpamTime] = gettime();
Playerinfo[playerid][SpamCount]++;
ifPlayerinfo[playerid][SpamCount] == SPAM_MAX_MSGS)
{
new name[24];
new string[200];
GetPlayerName(playerid,name,24);
format(string,sizeof(string),"%s (%d) has been muted for %d Minutes. Reason: Spam.", name, playerid, AutoUnmuteTime);
SendClientMessageToAll(ADMINCOLOR,string);
SendClientMessage(playerid,red,"* Spam level reached, You have received your final warning (3/3)! Reason: Spam.");
Playerinfo[playerid][Muted] = 1;
SetTimerEx("AutoUnMute",AutoUnmuteTime*60000,false ,"i",playerid);
}
else if(gettime() - Playerinfo[playerid][SpamTime] > SPAM_TIMELIMIT) // All Variables set to 0 if interval of time in player messages is long
{
Playerinfo[playerid][SpamCount] = 0;
Playerinfo[playerid][SpamTime] = gettime();
}
if(gettime() - Playerinfo[playerid][SpamTime] < SPAM_TIMELIMIT)
{
new string[200];
Line 687- format(string,sizeof(string),"* "COL_RED"Warning received (%d/%d)! Reason: Spam.",SpamCount,SPAM_MAX_MSGS);
SendClientMessage(playerid,white,string);
}
return 0;
}
It can't work for me, Help me pls and line 687 give tag mismatch warning how to fix this.
Thank You.