What Wroung
#1

Guys Help plz i've add admin chat But I Don't Know why Vip chat work and Admin chat Don't
pawn Код:
forward MessageToPlayerAdmin(color,const string[]);
forward MessageToPlayerVIP(color,const string[]);
pawn Код:
//OnPlayerText
//==============================================================================
// Vip Chat
//==============================================================================
    if(text[0] == '!' && PlayerInfo[playerid][VIP] == 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[DONATOR] %s: %s",string,text[1]);
        MessageToPlayerVIP(green,string);
        return 0;
    }
//==============================================================================
// Administration Chat
//==============================================================================
    if(text[0] == '#' && PlayerInfo[playerid][Admin] == 1)
    {
        new string[128]; GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[ADMIN] %s: %s",string,text[1]);
        MessageToPlayerAdmin(grey,string);
        return 0;
    }
pawn Код:
public MessageToPlayerAdmin(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) == 1)
    if(PlayerInfo[i][Admin] >= 2)
    SendClientMessage(i, color, string);
    }
    return 1;
}

public MessageToPlayerVIP(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) == 1)
    if(PlayerInfo[i][VIP] >= 1)
    SendClientMessage(i, color, string);
    }
    return 1;
}
Reply


Messages In This Thread
What Wroung - by AYOUYOU - 14.01.2015, 11:14
Re: What Wroung - by Threshold - 14.01.2015, 11:21
Re: What Wroung - by Sawalha - 14.01.2015, 11:21
Re : What Wroung - by AYOUYOU - 14.01.2015, 11:23
Re: What Wroung - by Sawalha - 14.01.2015, 11:27
Re : Re: What Wroung - by AYOUYOU - 14.01.2015, 11:48
Re: What Wroung - by Threshold - 14.01.2015, 14:19

Forum Jump:


Users browsing this thread: 3 Guest(s)