cannot find chat message
#1



I tried to find this under OnPlayerText OnCOmmandReceive still couldnt find this line. And if you ask for onplayercommandtext there is none in my script.

Where do you think it come?

OnPlayerText
Код:
    CallLocalFunction("StoreChatLine", "ds", playerid, text);
    if(text[0] == ADMCHATKEY && pInfo[playerid][pLevel] >= 1)
	{
		format(Jstring,sizeof(Jstring),">> [Admin Chat] %s(%d): %s",GetName(playerid), 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(%d): %s",GetName(playerid), 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 %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;
		}
	}
OnPlayerCommandReceived
Код:
	if(pInfo[playerid][Jailed] == 1 && pInfo[playerid][pLevel] == 0)
    {
	  SendClientMessage(playerid,red,"You can not use commands in Jail");
	  return 0;
	}
	if(ReadCommands == 1)
	{
      format(Cmdstr, sizeof(Cmdstr), ">>> %s(%d) Used command: %s", GetName(playerid),playerid,cmdtext);
      foreach(Player, i)
	  {
		if(pInfo[i][pLevel] >= 1 && pInfo[i][pLevel] > pInfo[playerid][pLevel] && i != playerid)
		{
		   SendClientMessage(i, Cmdcolor, Cmdstr);
		}
Reply


Messages In This Thread
cannot find chat message - by kbalor - 28.10.2013, 21:13
Re: cannot find chat message - by HardRock - 28.10.2013, 21:16
Re: cannot find chat message - by kbalor - 28.10.2013, 21:25
Re: cannot find chat message - by kbalor - 29.10.2013, 14:52
Re: cannot find chat message - by DanishHaq - 29.10.2013, 14:57
Re: cannot find chat message - by kbalor - 29.10.2013, 15:29

Forum Jump:


Users browsing this thread: 2 Guest(s)