[AJUDA]Comando nгo seta na Dini
#2

pawn Код:
if(strcmp(cmd,"/setadmin",true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new player[MAX_PLAYER_NAME];
        if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][Admin] >= 5)
        {
            if(!strlen(tmp))
                return SendClientMessage(playerid,COLOR_RED,"USE: /daradmin [id] [nнvel]");
            if(!IsNumeric(tmp))
                return SendClientMessage(playerid,COLOR_WHITE,"[AVISO] Por favor digite o ID do Player.");
            if(!IsPlayerConnected(strval(tmp)))
                return SendClientMessage(playerid,COLOR_WHITE,"[ERRO] Jogador indisponнvel.");

            giveplayerid = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            new level = strval(tmp);
            new Level;
            new playername[24];
            PlayerInfo[giveplayerid][Admin] = dini_Int(file,"Level");
            GetPlayerName(giveplayerid, playername, sizeof(playername));
            format(file,sizeof(file),"Contas/%s.ini",playername);
           
            if(!fexist(file)) dini_Create(file);
           
            dini_Set(file,"Level", PlayerInfo[giveplayerid][Admin]);

            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            GetPlayerName(playerid, player, sizeof(player));
           
            format(string, sizeof(string), "{FFFF00}Adm.Cmd:{33AAFF} O Administrador %s deu para vocк [Level %d] de Administrador!",player, level);
            SendClientMessage(giveplayerid, COLOR_WHITE, string);
           
            format(string, sizeof(string), "{FFFF00}Adm.Cmd:{33AAFF} Vocк deu para %s [Level %d] de Administrador!", giveplayer, level);
            SendClientMessage(playerid, COLOR_WHITE, string);
        }
        else if(PlayerInfo[playerid][Admin] < 5) return SendClientMessage(playerid,COLOR_RED, "[ERRO] Vocк nгo й Administrador!");
        return 1;
    }
tenta.
Reply


Messages In This Thread
[AJUDA]Comando nгo seta na Dini - by Nake01 - 30.06.2011, 20:54
Re: [AJUDA]Comando nгo seta na Dini - by TheGarfield - 30.06.2011, 21:07
Re: [AJUDA]Comando nгo seta na Dini - by Nake01 - 30.06.2011, 21:09
Re: [AJUDA]Comando nгo seta na Dini - by TheGarfield - 30.06.2011, 23:47
Re: [AJUDA]Comando nгo seta na Dini - by Nake01 - 30.06.2011, 23:57
Re: [AJUDA]Comando nгo seta na Dini - by Tijoka - 01.07.2011, 15:04
Re: [AJUDA]Comando nгo seta na Dini - by Ricop522 - 01.07.2011, 15:15
Re: [AJUDA]Comando nгo seta na Dini - by Tijoka - 01.07.2011, 15:19

Forum Jump:


Users browsing this thread: 1 Guest(s)