SA-MP Forums Archive
[PEDIDO] Chat - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [PEDIDO] Chat (/showthread.php?tid=239222)



[PEDIDO] Chat - [AF]Junior - 13.03.2011

Eu quero um chat vip, jб tentei pegar do thug life city e nгo deu... E sу os vips podem ler.

pawn Код:
if(PlayerInfo[playerid][VIP] != 1)
isso й quando o player й vip.

Obrigado. =)


Re: [PEDIDO] Chat - [Ips]Guh - 13.03.2011

1° : if(PlayerInfo[playerid][VIP] != 1) o !ali executa como "Nao VIP"..

2° : Uso zcmd..adapta ae..se nao conseguir adapto pra vc.....
pawn Код:
CMD:chatv ( playerid, params[] )
    {
        if(IsPlayerConnected(playerid))
        {
            new string[128];
            new sendername[MAX_PLAYER_NAME];
            new idx;
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(params);
            while ((idx < length) && (params[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = params[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COR_VERDE, "USE: /chatv");
                return 1;
            }
            format(string, sizeof(string), "*VIP %s: %s", sendername, result);
            if (PlayerInfo[playerid][VIP] >= 1)
            {
            SendClientMessageToAll(0x33CCFFAA, string);
            }
            printf("Vip %s: %s", sendername, result);
        }
        return 1;
    }



Re: [PEDIDO] Chat - StreetGT - 13.03.2011

possa, ZCMD + sscanf rullez
se fosse com o sscanf esse comando era muito mais pequeno


Re: [PEDIDO] Chat - [AF]Junior - 13.03.2011

Valeu brother, sim eu uso zcmd...

Funcionou perfeitamente \o/