What Wroung
#2

pawn Код:
//OnPlayerText
//==============================================================================
// Vip Chat
//==============================================================================
    if(text[0] == '!' && PlayerInfo[playerid][VIP])
    {
        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])
    {
        new string[128];
        GetPlayerName(playerid,string,sizeof(string));
        format(string, sizeof(string), "[ADMIN] %s: %s", string, text[1]);
        MessageToPlayerAdmin(grey, string);
        return 0;
    }
You had 'PlayerInfo[playerid][Admin] == 1' and 'PlayerInfo[playerid][VIP] == 1', which means it only would have worked if you were a level 1 admin or level 1 VIP.

pawn Код:
public MessageToPlayerAdmin(color, const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(PlayerInfo[i][Admin]) SendClientMessage(i, color, string);
    }
    return 1;
}

public MessageToPlayerVIP(color, const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(PlayerInfo[i][VIP]) 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: 1 Guest(s)