29.02.2012, 22:08
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.
(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.