Posts: 17
Threads: 1
Joined: Feb 2012
Reputation:
0
Chat limits for new players,
I mean no chat enabled for new players until they get 1 or 2 hours played on server (to avoid stupid ads to other servers).
It is possible this and how can be done?
Ty.
Posts: 189
Threads: 1
Joined: Feb 2012
Reputation:
0
Ehmm you should take note that this would piss newbie players off and make them leave.
Posts: 17
Threads: 1
Joined: Feb 2012
Reputation:
0
(2614) : warning 213: tag mismatch
(2614) : error 001: expected token: ")", but found "["
(2614) : error 029: invalid expression, assumed zero
(2614) : error 017: undefined symbol "Hour"
(2614) : fatal error 107: too many error messages on one line
//==============================OnPlayerText======== ============================
public OnPlayerText(playerid, text[])
{
if(ServerInfo[playerid][Hour] < 1)
{
Inter_SendClientMessage(playerid,red,"|- Chat has been Disabled! You must have atleast more than 1 hour gameplay. -|");
return 0;
}
Ye, ty agree with you guys. I will search for this chat protections
Posts: 17
Threads: 1
Joined: Feb 2012
Reputation:
0
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.