[Pedido] Cmd adm
#1

galera, eu queria transformar isso daqui:

pawn Код:
if(strcmp(cmd, "/ahjuda", true) == 0 || strcmp(cmd, "/ah", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_DBLUE,"~ Believe RP Life Roleplay ~");
            if (PlayerInfo[playerid][pAdmin] >= 1)
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Level 1] /mascara /dirigircarro /profs /spawn /trazer /prender /mutar /kick  /bofetada /dn /up /lt /fly");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Level 1] /afk /emp /fixveh  /rt /espiar /checararmas /pararespiar /irls /irlv /irsf /ir /cv /a /mp");
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Level 1] /lprocurado /emp /cabanamoto /irhotel /rodas /pjveh /corveh /suspenar /rnos /rsuspenar /infoxiter");
            }
            if (PlayerInfo[playerid][pAdmin] >= 2)
            {
                SendClientMessage(playerid, COLOR_OOC,"[Level 2] /darcolete /darvida /skydive /ouvirtodos /congelar /abastercertodos");
                SendClientMessage(playerid, COLOR_OOC,"[Level 2] /daremprego  /pegarip /avisados /pstats /tirararmas /descongelar");
            }
            if (PlayerInfo[playerid][pAdmin] >= 3)
            {
                SendClientMessage(playerid, COLOR_YELLOW,"[Level 3] /sban /aviso /ao /tempo  /mark /irmark /pegarcarro /dararma /eequipar");
                SendClientMessage(playerid, COLOR_YELLOW,"[Level 3] /bangu /ban /irkick /irblood /irtrack /irvice /irderby /irrc /irin /irin2 /irmar /irjet");
                SendClientMessage(playerid, COLOR_YELLOW,"[Level 3] /v /veh /sairhosp /tunados /entercar /ircar /irchiliad /irstad /ir /trazer");
            }
            if (PlayerInfo[playerid][pAdmin] >= 4)
            {
                SendClientMessage(playerid, COLOR_YELLOW2,"[Level 4] /spawncar /tiraraviso /tirarprof /ativarsms /tiraremprego /fourdive  /hq /logout /logoutpl /logoutall ");
                SendClientMessage(playerid, COLOR_YELLOW2,"[Level 4] /dardrogas /darmateriais /forceskin /setfamily /mudarcarrocasa /fixveh /setchamp /explodir");
            }
            if (PlayerInfo[playerid][pAdmin] >= 5)
            {
                SendClientMessage(playerid, BLUE,"[Level 5] /spawncar2 /addenthouse /addentbiz /addentsbiz /asellhouse /asellbiz /house /houseo /addentradasbiz /biz /sbiz /edit /editar");
            }
            if (PlayerInfo[playerid][pAdmin] >= 3000)
            {
                SendClientMessage(playerid, COLOR_RED,"[Level 3000] /delveh /darlider /carroalugado /iniciarloteria /desbanirip");
                SendClientMessage(playerid, COLOR_RED,"[Level 3000] /resetarcarroscasa /pergunta /encerrarpergunta /enquete /horajogo /resetarconta /licenciar /daradminirc");
            }
            if (PlayerInfo[playerid][pAdmin] >= 4000)
            {
                SendClientMessage(playerid, COLOR_GREEN,"[Level 4000] /gmx /mudarnome /ativarmp /ativarcw /sairhosp /skick /sban /setstat /dolar  /resetarcarros");
            }
            if (PlayerInfo[playerid][pAdmin] == 5000)
            {
                SendClientMessage(playerid, COLOR_LIGHTRED,"[Level 5000] /resetarconta /tirarvip /darvipinho /darvipmaster /darvip /darvipmaster /dardinheiro /dinheiro");
                SendClientMessage(playerid, COLOR_LIGHTRED,"[Level 5000] /balloons /mask");
            }
            SendClientMessage(playerid, COLOR_DBLUE,"~ Believe RP ~");
                }
        return 1;
    }
Em dialog:


Oque devo fazer?
Reply
#2

Cria no Topo uma Define para os Comandos Ex :
pawn Код:
#define Admin 22 // SE Caso a ID ja e usada modifique para outra..
Agora e so Por em cada Msgn Ali
Isso Aqui :
pawn Код:
ShowPlayerDialog(playerid,Admin,DIALOG_STYLE_MSGBOX,"Level 1 Comandos","MENSAGEMS\nAQUI","Fechar","");
..
Reply
#3

pawn Код:
SendClientMessage(playerid, COLOR_LIGHTRED,"[Level 5000] /resetarconta /tirarvip /darvipinho /darvipmaster /darvip /darvipmaster /dardinheiro /dinheiro");

usando dialog utilizando strcat

new strcat2[128];
strcat(strcat2,"[Level 5000] /resetarconta /tirarvip /darvipinho /darvipmaster /darvip /darvipmaster /dardinheiro /dinheiro");
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX,"Comando de Admin", strcat2 ,"OK","OK")
OBS: fis aqui mesmo caso tenha algum erro.
Reply
#4

Troque esse seu codigo por esse
pawn Код:
if(strcmp(cmd, "/ah", true) == 0 || strcmp(cmd, "/ah", true) == 0)
    {
    new Ajuda[3000];
    if (PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, BRANCO, "Vocк precisa ser admin para usar este comando!");
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
        strcat(Ajuda, "[Level 1] /mascara /dirigircarro /profs /spawn /trazer /prender /mutar /kick  /bofetada /dn /up /lt /fly\n");
        strcat(Ajuda, "[Level 1] /afk /emp /fixveh  /rt /espiar /checararmas /pararespiar /irls /irlv /irsf /ir /cv /a /mp\n\n");
        strcat(Ajuda, "[Level 1] /lprocurado /emp /cabanamoto /irhotel /rodas /pjveh /corveh /suspenar /rnos /rsuspenar /infoxiter");
    }
        if (PlayerInfo[playerid][pAdmin] >= 2)
    {
        strcat(Ajuda, "[Level 2] /darcolete /darvida /skydive /ouvirtodos /congelar /abastercertodos\n");
        strcat(Ajuda, "[Level 2] /daremprego  /pegarip /avisados /pstats /tirararmas /descongelar\n\n");
    }
        if (PlayerInfo[playerid][pAdmin] >= 3)
    {
        strcat(Ajuda, "[Level 3] /sban /aviso /ao /tempo  /mark /irmark /pegarcarro /dararma /eequipar\n");
        strcat(Ajuda, "[Level 3] /bangu /ban /irkick /irblood /irtrack /irvice /irderby /irrc /irin /irin2 /irmar /irjet\n");
        strcat(Ajuda, "[Level 3] /v /veh /sairhosp /tunados /entercar /ircar /irchiliad /irstad /ir /trazer\n\n");
    }
        if (PlayerInfo[playerid][pAdmin] >= 4)
    {
        strcat(Ajuda, "[Level 4] /spawncar /tiraraviso /tirarprof /ativarsms /tiraremprego /fourdive  /hq /logout /logoutpl /logoutall\n ");
        strcat(Ajuda, "[Level 4] /dardrogas /darmateriais /forceskin /setfamily /mudarcarrocasa /fixveh /setchamp /explodir\n\n");
    }
        if (PlayerInfo[playerid][pAdmin] >=5)
    {
        strcat(Ajuda, "[Level 5] /spawncar2 /addenthouse /addentbiz /addentsbiz /asellhouse /asellbiz /house /houseo /addentradasbiz /biz /sbiz /edit /editar"\n\n);
    }
        if (PlayerInfo[playerid][pAdmin] >= 3000)
    {
        strcat(Ajuda, "[Level 3000] /delveh /darlider /carroalugado /iniciarloteria /desbanirip");
        strcat(Ajuda, "[Level 3000] /resetarcarroscasa /pergunta /encerrarpergunta /enquete /horajogo /resetarconta /licenciar /daradminirc\n\n");
    }
        if (PlayerInfo[playerid][pAdmin] >= 4000)
    {
        strcat(Ajuda, "[Level 4000] /gmx /mudarnome /ativarmp /ativarcw /sairhosp /skick /sban /setstat /dolar  /resetarcarros\n\n");
    }
       if (PlayerInfo[playerid][pAdmin] == 5000)
    {
       strcat(Ajuda, "[Level 5000] /resetarconta /tirarvip /darvipinho /darvipmaster /darvip /darvipmaster /dardinheiro /dinheiro\n\n");
       strcat(Ajuda, "[Level 5000] /balloons /mask");
    }
    ShowPlayerDialog(playerid,1245, DIALOG_STYLE_MSGBOX, "Comandos admin - Ajuda", Ajuda, "Fechar", "");
    return 1;
Reply
#5

pawn Код:
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(3337) : error 004: function "FixHour" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5157) : error 004: function "FixHour" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5835) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5836) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5837) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5853) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5854) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5855) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5871) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5872) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5873) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5888) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5889) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5890) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5905) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5917) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5932) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(5944) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(6677) : error 017: undefined symbol "GetName"
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(6681) : error 017: undefined symbol "GetName"
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(6685) : error 004: function "ProxDetector" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(6697) : error 017: undefined symbol "GetName"
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(6701) : error 004: function "ProxDetector" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(6721) : error 004: function "ProxDetector" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(6737) : error 004: function "ProxDetector" is not implemented
C:\Users\Felipe\Desktop\Servers\Believe\gamemodes\BSL22.pwn(6757) : error 004: function "ProxDetector" is not implemented

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
26 Errors, e o incrivel que nenhum desses erros foi nas linhas desse cmd..
Reply
#6

coloca uma chave no finalzin

ShowPlayerDialog(playerid,1245, DIALOG_STYLE_MSGBOX, "Comandos admin - Ajuda", Ajuda, "Fechar", "");
return 1;
}

26 erros significa que uma chave aberta nгo foi fechada corretamente.
Reply
#7

funcionou, valeu!! Agora sу estou arrumando algumas partes no cmd, pq ficaram bugadas, vlw!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)