[Ajuda] Ajuda com comando /carandiru.
#1

Como faзo para dar o comando /carandiru mas sem estar em Modo trabalho (/trabalhar)?

PHP код:
    if(strcmp(cmd"/carandiru"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /carandiru [ id ] [tempo]");
                return 
1;
            }
            new 
playa;
            new 
money;
            
playa ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
money strval(tmp);
            if (
PlayerInfo[playerid][pAdmin] >= 1)
            {
                if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342)
                {
                
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                return 
1;
                }
                if(
IsPlayerConnected(playa))
                {
                    if(
playa != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(playagiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
format(stringsizeof(string), "* Vocк mandou %s para a cela admin."giveplayer);
                        
SendClientMessage(playeridCOLOR_LIGHTREDstring);
                        
format(stringsizeof(string), "* Voce foi preso pelo  Admin %s."sendername);
                        
SendClientMessage(playaCOLOR_LIGHTREDstring);
                        
ResetPlayerWeapons(playa);
                        
WantedPoints[playa] = 0;
                        
PlayerInfo[playa][pJailed] = 6;
                        
PlayerInfo[playa][pJailTime] = money*60;
                        
SetPlayerInterior(playa0);
                        
SetPlayerPos(playa2695.0466,-2125.5537,13.5488);
                        
format(stringsizeof(string), "Voce foi preso por %d Minutos na Cela Admin."money);
                        
SendClientMessage(playaCOLOR_LIGHTBLUEstring);
                    }
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Voce nгo esta autorizado a usar este comando!");
            }
        }
        return 
1;
    } 
Reply
#2

Apenas apague isso:
pawn Код:
Code:
                if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342)
                {
                SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
                }
Reply
#3

Mas players normais (nгo admins) nгo vгo poder usar, certo?
Reply
#4

Se vc apagar a linha abaixo todos poderao usar, caso contrario, apenas administradores.
pawn Код:
if (PlayerInfo[playerid][pAdmin] >= 1)
Reply
#5

Certo. Obrigado!

++rep.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)