Vip Chat![Help] [+ Rep]
#5

On top of your script
pawn Код:
forward VIPMSG(color,const string[]);
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '!' && PlayerInfo[playerid][dRank] >= 1)
    {
        new string[128];
        GetPlayerName(playerid,string,sizeof(string));
        format(string,sizeof(string),"[VIP Chat]%s: %s",string,text[1]);
        VIPMSG(0x8FBC8FFF,string);
        return 0;
    }
     return 1;
}

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


Messages In This Thread
Vip Chat![Help] [+ Rep] - by Nirzor - 27.09.2012, 14:02
Re: Vip Chat![Help] [+ Rep] - by kbalor - 27.09.2012, 14:10
Re: Vip Chat![Help] [+ Rep] - by SmithyComp - 27.09.2012, 14:10
Re: Vip Chat![Help] [+ Rep] - by Nirzor - 27.09.2012, 14:24
Re: Vip Chat![Help] [+ Rep] - by .v - 27.09.2012, 14:26
Re: Vip Chat![Help] [+ Rep] - by Jarnu - 27.09.2012, 14:28
Re: Vip Chat![Help] [+ Rep] - by .v - 27.09.2012, 14:32
Re: Vip Chat![Help] [+ Rep] - by Nirzor - 27.09.2012, 14:44

Forum Jump:


Users browsing this thread: 2 Guest(s)