[Ajuda] Comando /cv ADM
#1

tipo to querendo fazer um sistema que cada tipo de Adm fique com o nome de uma tal cor no /cv por exemplo:

[Helper] Mensagem
[GM] Mensagem
mais nгo to conseguindo fazer isso, olha aqui como ta o pawn.

pawn Код:
dcmd_cv(playerid, params[])
    {
        if(Player[playerid][pAdmin] < 1 && Player[playerid][pEnigma] < 1)
            return SendClientMessage(playerid, COLOR_RED, "[ERRO] Vocк nгo tem permissгo para usar este comando!");

        if(!strlen(params))
            return SendClientMessage(playerid, COLOR_GREY, "[USO] /cv <texto>");

        if(Player[playerid][pEnigma] > 0)
            format(thestring, sizeof(thestring), "[Enigma %d]: %s", Player[playerid][pEnigma], params);
        else
        {
            if(Player[playerid][pAdmin] == 1)
                format(thestring, sizeof(thestring), "[Helper] %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 2)
                format(thestring, sizeof(thestring), "[Moderador] %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 3)
                format(thestring, sizeof(thestring), "[Admin Level 1] %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 4)
                format(thestring, sizeof(thestring), "[Admin Level 2] %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 5)
                format(thestring, sizeof(thestring), "[Admin de Confianзa] %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 6)
                format(thestring, sizeof(thestring), "[GM] %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 7)
                format(thestring, sizeof(thestring), "[GA] %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 8)
                format(thestring, sizeof(thestring), "[Admin RCON] %s: %s",Player[playerid][pName],params);
        }
        SendClientMessageToAll(COLOR_ADMIN,thestring);
        WriteLog("admins", thestring);
        return 1;
    }
Obrigado.
Reply
#2

pawn Код:
dcmd_cv(playerid, params[])
    {
        if(Player[playerid][pAdmin] < 1 && Player[playerid][pEnigma] < 1)
            return SendClientMessage(playerid, COLOR_RED, "[ERRO] Vocк nгo tem permissгo para usar este comando!");

        if(!strlen(params))
            return SendClientMessage(playerid, COLOR_GREY, "[USE] /cv <texto>");

        if(Player[playerid][pEnigma] > 0)
            format(thestring, sizeof(thestring), "[Enigma %d]: %s", Player[playerid][pEnigma], params);
        else
        {
            if(Player[playerid][pAdmin] == 1)
                format(thestring, sizeof(thestring), "{EA0000}[Helper]{FFFFFF} %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 2)
                format(thestring, sizeof(thestring), "{02AF00}[Moderador]{FFFFFF} %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 3)
                format(thestring, sizeof(thestring), "{000B75}[Admin Level 1]{FFFFFF} %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 4)
                format(thestring, sizeof(thestring), "{420031}[Admin Level 2]{FFFFFF} %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 5)
                format(thestring, sizeof(thestring), "{EDED00}[Admin de Confianзa]{FFFFFF} %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 6)
                format(thestring, sizeof(thestring), "{00E5FF}[GM]{FFFFFF} %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 7)
                format(thestring, sizeof(thestring), "{1C0F00}[GA]{FFFFFF} %s: %s",Player[playerid][pName],params);
            else if(Player[playerid][pAdmin] == 8)
                format(thestring, sizeof(thestring), "{FC00F8}[Admin RCON]{FFFFFF} %s: %s",Player[playerid][pName],params);
        }
        SendClientMessageToAll(COLOR_ADMIN,thestring);
        WriteLog("admins", thestring);
        return 1;
    }
Espero ter ajudado.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)