[Ajuda] Chat VIP (/vip)
#8

pawn Код:
CMD:v(playerid, params[])
    {
        if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pVIP] >= 1)
        {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /v [Chat Vip]");
                return true;
            }
            format(string, sizeof(string), "** VIP %s: %s", sendername, result);
            SendVIPMessage(0xFFCCFFAA,string);
            printf("VIP %s: %s", sendername, result);
        }
        return true;
    }
No final do GameMode :

pawn Код:
stock SendVIPMessage(color, string[]){
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pVIP] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}
Reply


Messages In This Thread
Chat VIP (/vip) - by Walking - 10.06.2013, 13:23
Re: Chat VIP (/vip) - by BieeelEvolution - 10.06.2013, 13:31
Re: Chat VIP (/vip) - by Walking - 10.06.2013, 13:38
Re: Chat VIP (/vip) - by BieeelEvolution - 10.06.2013, 13:39
Re: Chat VIP (/vip) - by Walking - 10.06.2013, 13:50
Re: Chat VIP (/vip) - by BieeelEvolution - 10.06.2013, 14:13
Re: Chat VIP (/vip) - by Walking - 10.06.2013, 14:23
Re: Chat VIP (/vip) - by DannielCooper - 10.06.2013, 14:35
Re: Chat VIP (/vip) - by Walking - 10.06.2013, 14:43
Respuesta: Chat VIP (/vip) - by Crahan - 10.06.2013, 14:49

Forum Jump:


Users browsing this thread: 1 Guest(s)