[Ajuda] Plis me ajudem
#1

os niveis sгo 1 2 3 4 ... como ficaria cada lvl de uma cor so me de um ex q fasso o resto obrigado
pawn Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um ADM !");
                return 1;
            }
            if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1340 && PlayerInfo[playerid][pAdmin] != 1341 && PlayerInfo[playerid][pAdmin] != 1342)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/administrar)");
                return 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(strfind(result, "198", true) != -1
            || strfind(result, "197", true) != -1
            || strfind(result, "189", true) != -1
            || strfind(result, "172", true) != -1
            || strfind(result, "198", true) != -1
            || strfind(result, "168", true) != -1
            || strfind(result, "47", true) != -1
            || strfind(result, "84", true) != -1
            || strfind(result, "189", true) != -1
            || strfind(result, "7777", true) != -1
            || strfind(result, "7778", true) != -1
            || strfind(result, "5555", true) != -1
            || strfind(result, "1122", true) != -1
            || strfind(result, "191", true) != -1
            || strfind(result, "5555", true) != -1
            || strfind(result, "7777", true) != -1
            || strfind(result, "4218", true) != -1
            || strfind(result, "7777", true) != -1
            || strfind(result, "7799", true) != -1
            || strfind(result, "7747", true) != -1
            || strfind(result, "7 7 7 7", true) != -1
            || strfind(result, "7 7 9 9", true) != -1
            || strfind(result, "7 7 9 5", true) != -1){
            new string2[128];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string2, sizeof(string2), "%s [%d] Estб Tentando divulgar algo: %s", sendername, playerid,result);
            ABroadCast(0x00FFFFAA,string2,1);
            SendClientMessage(playerid, 0x33FF00FF, "Cuidado nгo digite nъmeros no chat");
            return 1;
            }
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "(/av)isar [text]");
                return 1;
            }
            SendClientMessageToAll(COLOR_DBLUE, "{FFFFFF}|_______________ {FF7800}Aviso Da Adminstraзгo {FFFFFF}________________|");
            format(string, sizeof(string), "Admin {FFFA00}%s: {33FF00}%s", sendername, result);
            SendClientMessageToAll(0x33FF00FF, string);
        }
        return 1;
    }
Reply
#2

facil,tipo faзa chekar o player,se tiver 1 aviso, setplayercolor,se ter 2 avisos,setplayercolor etc... senao tiver aviso e dependendo do servidor,voзe meta o nick dos restantes players em rosa ou branco
Reply
#3

Exemplos:
pawn Код:
SendClientMessageToAll(COLOR_DBLUE, "{FFFFFF}|_______________ {FF7800}Aviso Da Adminstraзгo {FFFFFF}________________|");
if(PlayerInfo[playerid][pAdmin] == 1)
{
    format(string, sizeof(string), "Admin {FFFA00}%s: {33FF00}%s", sendername, result);
    SendClientMessageToAll(0x33FF00FF, string);
}
else if(PlayerInfo[playerid][pAdmim] == 2)
{
    format(string, sizeof(string), "Admin {cor}%s: {cor}%s", sendername, result);
    SendClientMessageToAll(cor, string);
}
Ou
pawn Код:
SendClientMessageToAll(COLOR_DBLUE, "{FFFFFF}|_______________ {FF7800}Aviso Da Adminstraзгo {FFFFFF}________________|");
if(PlayerInfo[playerid][pAdmin] == 1)
{
    format(string, sizeof(string), "Admin {FFFA00}%s: {33FF00}%s", sendername, result);
}
else if(PlayerInfo[playerid][pAdmim] == 2)
{
    format(string, sizeof(string), "Admin {cor}%s: {cor}%s", sendername, result);
}
SendClientMessageToAll(cor, string);
Ou
pawn Код:
SendClientMessageToAll(COLOR_DBLUE, "{FFFFFF}|_______________ {FF7800}Aviso Da Adminstraзгo {FFFFFF}________________|");
if(PlayerInfo[playerid][pAdmin] == 1) format(string, sizeof(string), "Admin {FFFA00}%s: {33FF00}%s", sendername, result);
else if(PlayerInfo[playerid][pAdmim] == 2) format(string, sizeof(string), "Admin {cor}%s: {cor}%s", sendername, result);
SendClientMessageToAll(cor, string);
Ta ai os exemplos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)