lead the file .PWN and open it from there goes to the "public OnPlayerText (playerid, cmdtext)" and change this:
Dalate this:
And change this code to a public, look:
And paste this line in public "OnPlayerText(playerid, cmdtext[])", look:
Code Select
public OnPlayerText(playerid, cmdtext[])
{
new cmd[256], tmp[256],tmp2[256],rules[256];
new idx, plr, Count, i;
new Float:x, Float:y, Float:z;
cmd = strtok(cmdtext, idx);
format(INFO,256, REGISTERS, gPlayers[playerid]);
new spammer = (GetTickCount()-MSNCount[playerid])/MSNxSEC;
MSNPlayer[playerid]+=spammer-1;
if(MSNPlayer[playerid]>LIMIT_REP_SPAM)MSNPlayer[playerid]=LIMIT_REP_SPAM-1;
if(MSNPlayer[playerid]<0)MSNPlayer[playerid]=-1;
MSNCount[playerid]=GetTickCount();
if(MSNPlayer[playerid]<0) {
PlayerKicked(playerid,"Server","-"," NO SPAMM");
return 1;
}
else if (strcmp(cmd, cmd, true) == 0) {
if (strcmp(cmd, Spamming[playerid][LastText], true) == 0 && Spamming[playerid][CountText] >= 3) PlayerKicked(playerid,"Server","-"," SPAMMING");
else {
format(MSN,256,"%s", cmdtext);
if (strcmp(cmd, Spamming[playerid][LastText], true) == 0) {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = Spamming[playerid][CountText] + 1;}
else {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = 0;}
}
return 1;
}
if (strcmp(cmd, "urbo", true) == 0 || strcmp(cmd, "turbo", true) == 0) {
PlayerKicked(playerid,"Server","-"," Forbidden Text");
return 1;
}
Dalate this:
Code Select
if (strcmp(cmd, cmd, true) == 0) {
if (strcmp(cmd, Spamming[playerid][LastText], true) == 0 && Spamming[playerid][CountText] >= 3) PlayerKicked(playerid,"Server","-"," SPAMMING");
else {
format(MSN,256,"%s", cmdtext);
if (strcmp(cmd, Spamming[playerid][LastText], true) == 0) {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = Spamming[playerid][CountText] + 1;}
else {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = 0;}
}
return 1;
}
And change this code to a public, look:
Code Select
public PlayerSpamming(playerid,cmd[],cmdtext[])
{
if (strcmp(cmd, cmd, true) == 0) {
if (strcmp(cmdtext, Spamming[playerid][LastText], true) == 0 && Spamming[playerid][CountText] >= 3) PlayerKicked(playerid,"Server","-"," SPAMMING");
else {
format(MSN,256,"%s", cmdtext);
if (strcmp(cmd, Spamming[playerid][LastText], true) == 0) {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = Spamming[playerid][CountText] + 1;}
else {Spamming[playerid][LastText] = MSN; Spamming[playerid][CountText] = 0;}
}
}
return 1;
}
And paste this line in public "OnPlayerText(playerid, cmdtext[])", look:
Code Select
public OnPlayerText(playerid, cmdtext[])
{
new cmd[256], tmp[256],tmp2[256],rules[256];
new idx, plr, Count, i;
new Float:x, Float:y, Float:z;
cmd = strtok(cmdtext, idx);
format(INFO,256, REGISTERS, gPlayers[playerid]);
PlayerSpamming(playerid,cmd,cmdtext);// <-- This line paste here.
new spammer = (GetTickCount()-MSNCount[playerid])/MSNxSEC;
MSNPlayer[playerid]+=spammer-1;
if(MSNPlayer[playerid]>LIMIT_REP_SPAM)MSNPlayer[playerid]=LIMIT_REP_SPAM-1;
if(MSNPlayer[playerid]<0)MSNPlayer[playerid]=-1;
MSNCount[playerid]=GetTickCount();
if(MSNPlayer[playerid]<0) {
PlayerKicked(playerid,"Server","-"," Forbidden SPAMM");
return 1;
}