[AJUDA]Comando admin nao funfa
#1

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
Reply
#2

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
Reply
#3

Bota isso:

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

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

@EDIT

Precisa estar logado na RCON.
Reply
#4

OOO Pera ai tem algo errado ai..

nao muda nada nao, ageita isso aqui.

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

eu tenho esse codigo, e como lhe mandei
Reply
#6

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.
Reply
#7

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

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 ¬¬
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)