Chat limits for new players
#1

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.
Reply
#2

Under onplayertext do
pawn Код:
if(PlayerInfo[playerid][Hour] < 1)
{
         SendClientMessage(playerid,-1,"ERROR: You must have atleast more than 1 hour gameplay");
         return 0;
}
Reply
#3

Many thanks! I thought it's something with onplayertext but did not know how to apply the necessary condition.
Many thanks again.
Reply
#4

Ehmm you should take note that this would piss newbie players off and make them leave.
Reply
#5

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
Reply
#6

(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
Reply
#7

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.
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)