[Ajuda] Erro /setskin
#1

Bom galera o meu comando /setskin sempre quando os admins abaixo de 1342 digita fala que precisa trabalhar eu quero que os admins acima de 1340, nгo precisa-se trabalhar para setar os skins, olhe o code.

PHP код:
    if(strcmp(cmd"/setskin"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /setskin [playerid] [skin id]");
                return 
1;
            }
            new 
para1;
            new 
level;
            
para1 ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
level strval(tmp);
            if(
level 299 || level 1) { SendClientMessage(playeridCOLOR_GREY"id desconhecido!"); return 1; }
            if (
PlayerInfo[playerid][pAdmin] >= 1340)
            {
                if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342)
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
                    return 
1;
                }
                if(
IsPlayerConnected(para1))
                {
                    if(
para1 != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(para1giveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
PlayerInfo[para1][pSkin] = level;
                        if(
admtrampando[playerid] == && admhide[playerid] == 1)
                        {
                            
format(stringsizeof(string), "O admin BOT_BMRPG mudou sua Skin para %d",level);
                        }
                        else
                        {
                            
format(stringsizeof(string), "O admin %s mudou sua Skin para %d"sendername,level);
                        }
                        
SendClientMessage(para1COLOR_WHITEstring);
                        
format(stringsizeof(string), "Vocк mudou a skin do %s para %d."giveplayer,level);
                        
SendClientMessage(playeridCOLOR_WHITEstring);
                        
SetPlayerSkin(para1PlayerInfo[para1][pSkin]);
                    }
                }
//not connected
            
}
            else
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo tem permissгo para usar esse comando!");
            }
        }
        return 
1;
    } 
Reply
#2

pawn Код:
if(strcmp(cmd, "/setskin", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USE: /setskin [playerid] [skin id]");
                return 1;
            }
            new para1;
            new level;
            para1 = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            level = strval(tmp);
            if(level > 299 || level < 1) { SendClientMessage(playerid, COLOR_GREY, "id desconhecido!"); return 1; }
            if (PlayerInfo[playerid][pAdmin] >= 1340)
            {
                if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] < 1340)
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                    return 1;
                }
                if(IsPlayerConnected(para1))
                {
                    if(para1 != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(para1, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        PlayerInfo[para1][pSkin] = level;
                        if(admtrampando[playerid] == 1 && admhide[playerid] == 1)
                        {
                            format(string, sizeof(string), "O admin BOT_BMRPG mudou sua Skin para %d",level);
                        }
                        else
                        {
                            format(string, sizeof(string), "O admin %s mudou sua Skin para %d", sendername,level);
                        }
                        SendClientMessage(para1, COLOR_WHITE, string);
                        format(string, sizeof(string), "Vocк mudou a skin do %s para %d.", giveplayer,level);
                        SendClientMessage(playerid, COLOR_WHITE, string);
                        SetPlayerSkin(para1, PlayerInfo[para1][pSkin]);
                    }
                }//not connected
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo tem permissгo para usar esse comando!");
            }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)