[AJUDA]Comando nгo seta os cara sу eu
#1

Galera esse comando de setar Admin nгo ta funfando com os cara sу dar pra setar eu mesmo os outros nгo ta setando

PHP код:
     if(!strcmp(cmd"/setadmin"true))
    {
        new 
Level;
        new 
Sjim[256];
           new 
name[MAX_PLAYER_NAME];
        
GetPlayerName(playeridnamesizeof(name));
          if(!
IsPlayerAdmin(playerid) && PlayerInfo[playerid][Admin] < 5)
        {
            
SendClientMessage(playerid0xFC4430AA"¤ Vocк nгo й administrador logado na RCON !");
            return 
1;
        }
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp))
        {
            
SendClientMessage(playerid0xFF6F28AA"¤ Uso correto: /setaradmin [id] [level]");
            return 
1;
        }
        
playerid strval(tmp);
        
tmp strtok(cmdtextidx);
        if(!
strlen(tmp))
        {
            
SendClientMessage(playerid0xFF6F28AA"¤ Uso correto: /setaradmin [id] [level]");
            return 
1;
        }
        
Level strval(tmp);
        if(
Level || Level 5) return SendClientMessage(playerid0xFFFF00AA"¤ Somente level de administrador entre 1 e 5!");
        if(
IsPlayerConnected(playerid))
        {
            if(
playerid != INVALID_PLAYER_ID)
            {
                
format(Sjimsizeof(Sjim), "¤ Vocк deu б %s (ID:%d), level %d de administrador."nameplayeridLevel);
                
SendClientMessage(playerid0x00A400AASjim);
                
format(Sjimsizeof(Sjim), "¤ [PROMOVIDO] O Administrador %s lhe deu Level %d de Administrador!"nameLevel);
                
SendClientMessage(playerid0x00FF00AASjim);
                
GameTextForPlayer(playerid"~p~PROMOVIDO!"50000);
                
PlayerInfo[playerid][Admin] = Level;
                
format(filesizeof(file), "Contas/%s.ini"name);
                if(!
dini_Exists(file))
                {
                    
dini_Create(file);
                    
dini_IntSet(file"Level"Level);
                }
                else
                {
                    
dini_IntSet(file"Level"Level);
                    
PlayerInfo[playerid][Admin] = Level;
          }
            return 
1;
        }
        return 
1;
    }
        else
        {
            
SendClientMessage(playerid0xFC4430AA"¤ (ERRO) Jogador nгo conectado!");
            return 
1;
        }
    } 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)