Chat limits for new players -
Raku - 29.02.2012
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.
Re: Chat limits for new players -
Tanush123 - 29.02.2012
Under onplayertext do
pawn Код:
if(PlayerInfo[playerid][Hour] < 1)
{
SendClientMessage(playerid,-1,"ERROR: You must have atleast more than 1 hour gameplay");
return 0;
}
Re: Chat limits for new players -
Raku - 29.02.2012
Many thanks! I thought it's something with onplayertext but did not know how to apply the necessary condition.
Many thanks again.
Re: Chat limits for new players -
Walsh - 29.02.2012
Ehmm you should take note that this would piss newbie players off and make them leave.
Re: Chat limits for new players -
SnG.Scot_MisCuDI - 29.02.2012
Quote:
Originally Posted by Walsh
Ehmm you should take note that this would piss newbie players off and make them leave.
|
yeah i agree.. Why dont you get an IP protector (something like that)
So if a player tpyes something in, in IP format it replaces it with your server IP.
Ive seen this done in a server
Re: Chat limits for new players -
Raku - 29.02.2012
(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
Re: Chat limits for new players -
grand.Theft.Otto - 29.02.2012
Quote:
Originally Posted by Tanush123
Under onplayertext do
pawn Код:
if(PlayerInfo[playerid][Hour] < 1) { SendClientMessage(playerid,-1,"ERROR: You must have atleast more than 1 hour gameplay"); return 0; }
|
Why would you give him an enum/variable that he doesn't even have defined in his script ...
Think before you copy and paste stuff.
Re: Chat limits for new players -
Raku - 29.02.2012
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.