Chat limits for new players
#8

Look, i found these (but is not enough) I saw a player when he make advertisements on the server with IP like 188 . 206 . etc . etc

(PS. *** I am not the author, the code lines are from SATDM11 gamemode!!!)

//================================================== ============================
// Forbidden Words
//================================================== ============================
if(ServerInfo[AntiSwear] == 1 && AccInfo[playerid][Level] < ServerInfo[MaxAdminLevel])
for(new s = 0; s < BadWordsCount; s++)
{
new pos;
while((pos = strfind(text,BadWords[s],true)) != -1)
for(new i = pos, j = pos + strlen(BadWords[s]); i < j; i++) text[i] = '*';
}
//================================================== ============================
// Anti Advertisements
//================================================== ============================
if(ServerInfo[AntiAds] == 1)
{
if(AdvertisementCheck(text) && AccInfo[playerid][Level] < 3)
{
AccInfo[playerid][MaxAdv]++;
new string[128];
format(string,sizeof(string),"|- Warning! Suspected ads in your message! (Warnings: %d/%d)",AccInfo[playerid][MaxAdv], MAX_ADV_WARNINGS);
Inter_SendClientMessage(playerid, grey,string);

if(AccInfo[playerid][MaxAdv] == MAX_ADV_WARNINGS)
{
format(string,sizeof(string),"|- You is Automatically Kicked. | Reason: Many ads in your Messages (%d/%d) -|",AccInfo[playerid][MaxAdv], MAX_ADV_WARNINGS);
Inter_SendClientMessage(playerid, lightred,string);

format(string,sizeof(string),"|- Player %s (Id:%d) has beenAutomatically Kicked. | Reason: Many Advertisements! (%d) -|",PlayerName2(playerid),playerid, MAX_ADV_WARNINGS);
SaveIn("KickLog",string); Kick(playerid);
Inter_SendClientMessageToAll(lightred, string);
print(string);
}
return 0;
}
}
//================================================== ============================
// Block CapsLock
//================================================== ============================
if(AccInfo[playerid][Caps] == 1)
UpperToLower(text);
if(ServerInfo[NoCaps] == 1)
UpperToLower(text);

//================================================== ============================
// Chat Lines (Console)
//================================================== ============================
for(new i = 1; i < MAX_CHAT_LINES-1; i++)
Chat[i] = Chat[i+1];
new ChatSTR[128];
GetPlayerName(playerid,ChatSTR,sizeof(ChatSTR));
format(ChatSTR,128,"[CHAT]%s: %s",ChatSTR, text[0]);
Chat[MAX_CHAT_LINES-1] = ChatSTR;



Like i said ... is not enough!. I want to restrict chat for 20 mins or maybe 1 hour for them.
Reply


Messages In This Thread
Chat limits for new players - by Raku - 29.02.2012, 21:29
Re: Chat limits for new players - by Tanush123 - 29.02.2012, 21:31
Re: Chat limits for new players - by Raku - 29.02.2012, 21:35
Re: Chat limits for new players - by Walsh - 29.02.2012, 21:38
Re: Chat limits for new players - by SnG.Scot_MisCuDI - 29.02.2012, 21:40
Re: Chat limits for new players - by Raku - 29.02.2012, 21:54
Re: Chat limits for new players - by grand.Theft.Otto - 29.02.2012, 22:02
Re: Chat limits for new players - by Raku - 29.02.2012, 22:08

Forum Jump:


Users browsing this thread: 4 Guest(s)