[Ajuda] quando digita /daradmin meu FS desliga
#1

Quando eu digito /daradmin todos os Comandos do meu FS para de funfar queria saber porque


COD;
PHP код:
    if(strcmp(cmd"/daradmin"true) == || strcmp(cmd"/daradmin"true) == 0)
    {
        
tmp strtok(cmdtextidx);
        
giveplayerid strval(tmp);
        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
        
GetPlayerName(playeridsendernamesizeof(sendername));
        
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
        
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
        
giveplayerid strval(tmp);
        if (
PlayerInfo[playerid][pAdmin] >= 7)
        {
            
SendClientMessage(playeridCOLOR_GRAD1"[USO]: /daradmin [ID/Nick][Level ADM]");
            return 
1;
        }
        
tmp strtok(cmdtextidx);
        if (
PlayerInfo[playerid][pAdmin] >= 7)
        {
            
SendClientMessage(playeridCOLOR_GRAD1"[USO]: /daradmin [ID/Nick][Level ADM]");
            return 
1;
        }
        
PlayerInfo[playerid][pAdmin] = dini_Int(udb_encode(sendername), "level");
        
level[playerid] = strval(tmp);
        if(
level[playerid] < 0)
        {
            
SendClientMessage(playerid0x980000AA"[ERRO] o Level de ADM й invalido");
            return 
1;
        }
        if(
level[playerid] > 7)
        {
            
SendClientMessage(playerid0x980000AA"[ERRO] Level de ADM invalido.!");
            return 
1;
        }
        if(
level[playerid] == PlayerInfo[giveplayerid][pAdmin])
        {
            
format(stringsizeof(string), "Este player ja tem level %d de admin!"level[playerid]);
            
SendClientMessage(playeridCOLOR_BLUEstring);
            return 
1;
        }
        if(
logged[playerid] == 1)
        {
            if(
IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 7)
            {
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
logged[giveplayerid] == 0)
                    {
                        
SendClientMessage(playeridCOLOR_RED"[ERRO] O player tem que estar logado para poder receber o level de admin!");
                        return 
1;
                    }
                    else
                    {
                        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        
dini_IntSet(udb_encode(giveplayer), "level"level[playerid]);
                        
format(stringsizeof(string), "Vocк deu para %s level %d de admin!"giveplayerlevel[playerid]);
                        
SendClientMessage(playeridCOLOR_BLUEstring);
                        
format(stringsizeof(string), "Vocк,%s, foi setado Administrador (level %d) pelo admin %s "giveplayer ,level[playerid], sendername);
                        
SendClientMessage(giveplayeridCOLOR_BLUEstring);
                        
PlayerInfo[giveplayerid][pAdmin] = dini_Int(udb_encode(giveplayer), "level");
                        new 
PlayerName[30];
                        
GetPlayerName(playeridPlayerName30);
      
printf("[Command] %s usou /setadmin para dar par %s level %d de admin."PlayerNamegiveplayerlevel[playerid]);
                    }
                }
                else
                {
                    
format(stringsizeof(string), "%d nгo й o nъmero de ID de um player ativo!"giveplayerid);
                    
SendClientMessage(playeridCOLOR_REDstring);
                }
            }
            else
            {
                
SendClientMessage(playeridCOLOR_RED"[ERRO] Vocк nгo tem permissгo para usar este comando!");
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"[ERRO] Vocк tem que estar logado para usar este comando!");
        }
        return 
1;
    } 
Reply


Messages In This Thread
[Ajuda] quando digita /daradmin meu FS desliga - by MatriXBorn - 08.10.2011, 19:24
Re: [Ajuda] quando digita /daradmin meu FS desliga - by [BWL]DuST - 08.10.2011, 19:28
Re: [Ajuda] quando digita /daradmin meu FS desliga - by Jason` - 08.10.2011, 19:48
Re: [Ajuda] quando digita /daradmin meu FS desliga - by Nake01 - 08.10.2011, 19:52
Re: [Ajuda] quando digita /daradmin meu FS desliga - by MatriXBorn - 08.10.2011, 19:57

Forum Jump:


Users browsing this thread: 1 Guest(s)