help onplayertext server crashed :s
#5

Quote:
Originally Posted by Konstantinos
View Post
CallLocalFunction function crashed the server. It is known:


What's line 692 from JLadmin?
Thanks for help here is the Code
LINE 692: CallLocalFunction("StoreChatLine", "ds", playerid, text);
Code:
public OnPlayerText(playerid, text[])
{
    CallLocalFunction("StoreChatLine", "ds", playerid, text);
 
    if(text[0] == MANAGER && pInfo[playerid][pLevel] == 6)
	{
		format(Jstring,sizeof(Jstring),"{00FFEE}[MANAGER] %s: %s",GetName(playerid),text[1]);
		foreach(Player, i) if(pInfo[i][pLevel] >= 1) SendClientMessage(i,Admchat,Jstring);
		WriteToLog(Jstring,"AdminChat");
	    return 0;
	}
    if(text[0] == ADMCHATKEY && pInfo[playerid][pLevel] >= 1)
	{
		format(Jstring,sizeof(Jstring),"|Admin Chat| %s: %s",GetName(playerid),text[1]);
		foreach(Player, i) if(pInfo[i][pLevel] >= 1) SendClientMessage(i,Admchat,Jstring);
		WriteToLog(Jstring,"AdminChat");
	    return 0;
	}
    if(pInfo[playerid][Muted] == 1)
	{
		SendClientMessage(playerid,red,"You are muted, you are not allowed to talk!");
		return 0;
	}
	if(text[0] == DONATORCHATKEY && pInfo[playerid][pLevel] >= 1)
	{
		format(Jstring,sizeof(Jstring),"|V.I.P Chat| %s: %s",GetName(playerid),text[1]);
		foreach(Player, i) if(pInfo[i][pLevel] >= 1) SendClientMessage(i,Admchat,Jstring);
		WriteToLog(Jstring,"VIPChatLog");
	    return 0;
	}
	if(IsDisabledChat == 1)
	{
		format(Jstring,sizeof(Jstring),"***Chat is disabled by Admin %s",AdmName);
		SendClientMessage(playerid,red,Jstring);
	    return 0;
	}
	if(AntiSpam == 1 && pInfo[playerid][Muted] == 0)
	{
           GetPVarString(playerid, "ChatMsg",CTMSG,128);
           if(!strcmp(CTMSG, text,  false))
           {
              pInfo[playerid][SpamWarns]++;
              if(pInfo[playerid][SpamWarns] < MAX_SPAM_WARNS)SendClientMessage(playerid,red,"WARNING: Do not repeat or you will be muted!");
              if(pInfo[playerid][SpamWarns] >= MAX_SPAM_WARNS)
              {
		          format(Jstring,sizeof(Jstring),"%s(%d) has been automatically muted for %d seconds | REASON: \"Spam\"",GetName(playerid),playerid,AUTO_MUTE_TIME);
				  SendClientMessageToAll(red, Jstring);
				  pInfo[playerid][Muted] = 1;
				  SetTimerEx("UnmutePlayer",AUTO_MUTE_TIME*1000,false,"d",playerid);
				  return 0;
			  }
		   }
		   else pInfo[playerid][SpamWarns] = 0;
		   SetPVarString(playerid,"ChatMsg",text);
	}
	if(AntiForbiddenWords == 1 && IsBadWord(text))
	for(new i = WordSt, l = WordSt + WordEn; i < l; i++) text[i] = '•';
	if(AntiAdv == 1)
	{
	    if(IsAdvertisement(text))
	    {
           if(AdminImmunity == 1 && pInfo[playerid][pLevel] >= 2) return 1;
           ShowPlayerDialog(playerid,JDIALOGS+200,DIALOG_STYLE_MSGBOX,"{FF0000}Advertising is NOT allowed on this server","{FF0000}You have been kicked from the server | REASON : \"Advertising\"","OK","");
		   SetTimerEx("KickPlayer",100,false,"d",playerid);
		   format(Jstring,sizeof(Jstring),"%s(%d) has been kicked | REASON: \"Advertising\"",GetName(playerid),playerid);
		   SendClientMessageToAll(red, Jstring);
		   format(Jstring,sizeof(Jstring),"%s(%d) has been automatically kicked for 'Advertising' (%s)",GetName(playerid),playerid,text);
		   SendToAdmins(orange,Jstring);
		   format(Jstring,sizeof(Jstring),"[SYSTEM KICK] %s has been kicked for 'Advertising' (%s)",GetName(playerid),text);
		   WriteToLog(Jstring,"KickLog");
		   return 0;
		}
	}
	return 1;
}
Reply


Messages In This Thread
help onplayertext server crashed :s - by Mahde - 04.02.2014, 10:25
Re: help onplayertext server crashed :s - by Mahde - 04.02.2014, 11:03
Re: help onplayertext server crashed :s - by EmilLykke - 04.02.2014, 11:08
Re: help onplayertext server crashed :s - by Konstantinos - 04.02.2014, 11:18
Re: help onplayertext server crashed :s - by Mahde - 04.02.2014, 11:20
Re: help onplayertext server crashed :s - by Konstantinos - 04.02.2014, 11:30
Re: help onplayertext server crashed :s - by Mahde - 04.02.2014, 11:50
Re: help onplayertext server crashed :s - by Konstantinos - 04.02.2014, 11:52
Re: help onplayertext server crashed :s - by Mahde - 04.02.2014, 11:56
Re: help onplayertext server crashed :s - by Konstantinos - 04.02.2014, 12:25

Forum Jump:


Users browsing this thread: 2 Guest(s)