SA-MP Forums Archive
[AJUDA]Comando admin nao funfa - 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: [AJUDA]Comando admin nao funfa (/showthread.php?tid=331160)



[AJUDA]Comando admin nao funfa - caoraivoso3 - 03.04.2012

Boas malta,e o seguinte este comando:
pawn Код:
if(strcmp(cmd, "/acurar", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "Comando: /acurar [playerid] ");
                    return 1;
                }
                new playa;
                playa = ReturnUser(tmp);
                tmp = strtok(cmdtext, idx);
                if (PlayerInfo[playerid][mstrvbcAdmin] >= 1)
                if (PlayerInfo[playerid][mstrvbcGm] >= 1)
                {
                    if(IsPlayerConnected(playa))
                    {
                        if(playa != INVALID_PLAYER_ID)
                        {
                            icurar(playa);
                            format(string, sizeof(string), " Foste curado por %s.",GetPlayerNameEx(playerid));
                            SendClientMessage(playa,COLOR_WHITE,string);
                            format(string, sizeof(string), " Curaste %s.",GetPlayerNameEx(playa));
                            SendClientMessage(playerid,COLOR_WHITE,string);
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "ERRO: Nao йs administrador.");
                }
            }
   return 1;
        }
eso admin pode usar e serve pa enxer o life do player,curar o player neste caso,so que admin nao consegue curar nem gm,porque? admin knd usa esse cmd apareзe "erro:nao es administrador." ajuda malta :S

++REP


Re: [AJUDA]Comando admin nao funfa - Sergiosousa - 03.04.2012

pawn Код:
if (PlayerInfo[playerid][mstrvbcAdmin] >= 1 || PlayerInfo[playerid][mstrvbcGm] >= 1)

// assim:
if(strcmp(cmd, "/acurar", true) == 0)
        {
            if(IsPlayerConnected(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "Comando: /acurar [playerid] ");
                    return 1;
                }
                new playa;
                playa = ReturnUser(tmp);
                tmp = strtok(cmdtext, idx);
                if (PlayerInfo[playerid][mstrvbcAdmin] >= 1 || PlayerInfo[playerid][mstrvbcGm] >= 1)
                {
                    if(IsPlayerConnected(playa))
                    {
                        if(playa != INVALID_PLAYER_ID)
                        {
                            icurar(playa);
                            format(string, sizeof(string), " Foste curado por %s.",GetPlayerNameEx(playerid));
                            SendClientMessage(playa,COLOR_WHITE,string);
                            format(string, sizeof(string), " Curaste %s.",GetPlayerNameEx(playa));
                            SendClientMessage(playerid,COLOR_WHITE,string);
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "ERRO: Nao йs administrador.");
                }
            }
   return 1;
        }
tenta


Re: [AJUDA]Comando admin nao funfa - sanalex - 03.04.2012

Bota isso:

pawn Код:
if(!IsPlayerAdmin(playa))
no lugar de:

pawn Код:
if(IsPlayerConnected(playa))
Acho que й isso

@EDIT

Precisa estar logado na RCON.


Re: [AJUDA]Comando admin nao funfa - sanalex - 03.04.2012

OOO Pera ai tem algo errado ai..

nao muda nada nao, ageita isso aqui.

pawn Код:
(playa))
o certo nгo seria
pawn Код:
(playerid))



Re: [AJUDA]Comando admin nao funfa - Sergiosousa - 03.04.2012

eu tenho esse codigo, e como lhe mandei


Re: [AJUDA]Comando admin nao funfa - caoraivoso3 - 03.04.2012

Obrigado sergio funfou =) ++REP pra voce e tbm brigado por ajudar sanalex. Sergio uso no meu gm a base do CRP tbm,so que ja ta mt "avanзada" ja tem 1 mes de trabalho emu gm =) tipos com gms piores co meu querem 60$ por eles.


Re: [AJUDA]Comando admin nao funfa - Sergiosousa - 03.04.2012

o meu tambem e CRP, se presisar ajuda e so falar!


Re: [AJUDA]Comando admin nao funfa - luizfel2 - 03.04.2012

Quote:
Originally Posted by caoraivoso3
Посмотреть сообщение
Obrigado sergio funfou =) ++REP pra voce e tbm brigado por ajudar sanalex. Sergio uso no meu gm a base do CRP tbm,so que ja ta mt "avanзada" ja tem 1 mes de trabalho emu gm =) tipos com gms piores co meu querem 60$ por eles.
? vocк trabalha 1 mйs nesse gm ? avб, vocк jб criou + de 1000 tуpicos dizendo que usa o CRP blб blб, e todos й pedindo ajuda, vocк nгo sabe ajeitar nada ¬¬


Re: [AJUDA]Comando admin nao funfa - Sergiosousa - 03.04.2012

Quote:
Originally Posted by luizfel2
Посмотреть сообщение
? vocк trabalha 1 mйs nesse gm ? avб, vocк jб criou + de 1000 tуpicos dizendo que usa o CRP blб blб, e todos й pedindo ajuda, vocк nгo sabe ajeitar nada ¬¬
menos sff