Cant Use Chat
#6

Quote:
Originally Posted by AdamsLT
Посмотреть сообщение
new string[MAX_PLAYERS], - would likely be too big to send.
change to
new string[ 144 ], - this is the largest string you can send with SendClientMessage.


ForCop already changed that in his code but he also removed the functionality to send the message within your virtual world and left another mistake.
You return 0 every loop iteration within vip, admin and normal chats. Move the return 0; outside of the loops like this. When you return 0; it stops everything so you only want to return after you send the correct messages to everyone you need.

PHP код:
if(text[0] == '@' && Account[playerid][Admin] >= 1
      { 
           
format(stringsizeof(string), "** |Admin Chat| %s: %s **"IsPlayerName(playerid), text[1]); 
        for(new 
0MAX_PLAYERSi++) 
          { 
            if(
IsPlayerConnected(i) && Account[i][Admin] >= 1
              { 
              
SendClientMessage(i0x0AFFC9FFstring); 
            } 
        } 
        return 
0;
    } 
It's working for a while then my player says that they can't chat, but I can see their chat and my player id is 0, what I found is only id 0 can read the chat, how to fix this??
Reply


Messages In This Thread
Cant Use Chat - by AfiqIqbal - 07.04.2018, 18:56
Re: Cant Use Chat - by ForCop - 07.04.2018, 19:23
Re: Cant Use Chat - by AfiqIqbal - 07.04.2018, 19:32
Re: Cant Use Chat - by ForCop - 07.04.2018, 19:39
Re: Cant Use Chat - by AdamsLT - 07.04.2018, 20:03
Re: Cant Use Chat - by AfiqIqbal - 08.04.2018, 03:23
Re: Cant Use Chat - by Mugala - 08.04.2018, 03:34
Re: Cant Use Chat - by Threshold - 08.04.2018, 03:41
Re: Cant Use Chat - by AfiqIqbal - 08.04.2018, 03:44
Re: Cant Use Chat - by Mugala - 08.04.2018, 03:50

Forum Jump:


Users browsing this thread: 1 Guest(s)