[Help] Vip chat
#9

Hi dude!

You're making it way too complicated! Why don't you use it like this? Add this under "OnPlayerText":

pawn Код:
if(text[0] == '*')
    {
        if(PlayerInfo[playerid][VIP] >= 1)
        {
            new str[128], name[24];
            GetPlayerName(playerid, name, 24);
            format(str, 128, "[VIP CHAT] %s(%d): %s", name,playerid, text[1]);
            SendMessageToVIP(COLOR_KHAKI,str);
            return 0;
        }
        return 1;
    }
And forward this:

pawn Код:
forward SendMessageToVIP(color,const string[]);
pawn Код:
public SendMessageToVIP(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;
}
I don't know what your enum for the player's info is like, just put a VIP-Level into it and replace the variables with your own! FINISHED!

Hope I could help!
Reply


Messages In This Thread
[Help] Vip chat - by ServerScripter - 27.02.2012, 17:12
Re: [Help] Vip chat - by Jeffry - 27.02.2012, 17:14
Re: [Help] Vip chat - by ServerScripter - 27.02.2012, 17:20
Re: [Help] Vip chat - by Zhao - 27.02.2012, 17:27
Re: [Help] Vip chat - by Konstantinos - 27.02.2012, 17:29
Re: [Help] Vip chat - by ServerScripter - 27.02.2012, 17:32
Re: [Help] Vip chat - by Konstantinos - 27.02.2012, 17:34
Re: [Help] Vip chat - by ServerScripter - 27.02.2012, 17:36
Re: [Help] Vip chat - by Twisted_Insane - 27.02.2012, 17:37

Forum Jump:


Users browsing this thread: 1 Guest(s)