Cant Use Chat
#2

Quote:
Originally Posted by AfiqIqbal
Посмотреть сообщение
I cant see my chat and others chat in my server, other player experienced the same situation aswell, I think the problem is from OnPlayerText, but I dont have any clue what is the error

PHP код:
public OnPlayerText(playeridtext[])
{
    new 
string[MAX_PLAYERS], var = GetPlayerVirtualWorld(playerid);
    
//
     
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;
            }
        }
    }
    if(
text[0] == '!' && Account[playerid][Vip] >= 1)
    {
        
format(stringsizeof(string), "~> |Vip Chat| %s: %s <~"IsPlayerName(playerid), text[1]);
         for(new 
0MAX_PLAYERSi++)
           {
             if(
IsPlayerConnected(i) && Account[i][Vip] >= 1)
               {
               
SendClientMessage(i0xFF0099AAstring);
               return 
0;
            }
        }
       }
      else
    {
         
format(stringsizeof(string), "%s (%d): {FFFFFF}%s"IsPlayerName(playerid), playeridtext);
           for(new 
0MAX_PLAYERSi++)
            {
              if(
IsPlayerConnected(i))
               {
                    if(
GetPlayerVirtualWorld(i) == var)
                  {
                       
SendClientMessage(iGetPlayerColor(playerid), string);
                       return 
0;
                  }
            }
        }
       }
       return 
1;

Help please
Код:
public OnPlayerText(playerid, text[])
{
    new string[144];
    //
     if(text[0] == '@' && Account[playerid][Admin] >= 1)
      {
           format(string, sizeof(string), "** |Admin Chat| %s: %s **", IsPlayerName(playerid), text[1]);
        for(new i = 0; i < MAX_PLAYERS; i++)
          {
            if(IsPlayerConnected(i) && Account[i][Admin] >= 1)
              {
              SendClientMessage(i, 0x0AFFC9FF, string);
              return 0;
            }
        }
    }
    if(text[0] == '!' && Account[playerid][Vip] >= 1)
    {
        format(string, sizeof(string), "~> |Vip Chat| %s: %s <~", IsPlayerName(playerid), text[1]);
         for(new i = 0; i < MAX_PLAYERS; i++)
           {
             if(IsPlayerConnected(i) && Account[i][Vip] >= 1)
               {
               SendClientMessage(i, 0xFF0099AA, string);
               return 0;
            }
        }
       }

         format(string, sizeof(string), "%s (%d): {FFFFFF}%s", IsPlayerName(playerid), playerid, text);
         SendClientMessageToAll(GetPlayerColor(playerid), string);

       return 1;
}
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: 2 Guest(s)