[Error] na org admin !
#5

PHP код:
dcmd_setadmin(playerid,params[]) {
    if(
PlayerInfo[playerid][LoggedIn] == 1) {
        if(
PlayerInfo[playerid][Level] >= 11 || IsPlayerAdmin(playerid)) {
            new 
tmp[256], tmp2[256], Index;        tmp strtok(params,Index), tmp2 strtok(params,Index);
            if(!
strlen(params)) return SendClientMessage(playeridred"USO: /setadmin [playerid] [nнvel]");
            new 
player1levelplayername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            
player1 strval(tmp);
            if(!
strlen(tmp2)) return SendClientMessage(playeridred"USO: /setadmin [playerid] [nнvel]");
            
level strval(tmp2);
            if(
IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
                if(
PlayerInfo[player1][LoggedIn] == 1) {
                    if(
level ServerInfo[MaxAdminLevel] ) return SendClientMessage(playerid,red,"ERRO: Nнvel Incorreto");
                    if(
level == PlayerInfo[player1][Level]) return SendClientMessage(playerid,red,"ERRO: Jogador jб possui este nнvel");
                       
CMDMessageToAdmins(playerid,"SETLEVEL");
                    
GetPlayerName(player1playernamesizeof(playername));    GetPlayerName(playeridadminnamesizeof(adminname));
                       new 
year,month,day;   getdate(yearmonthday); new hour,minute,secondgettime(hour,minute,second);
                    if(
level 0format(string,sizeof(string),"Administrador %s definiu vocк para Status de Administrador [nнvel %d]",adminnamelevel);
                    else 
format(string,sizeof(string),"Administrador %s definiu vocк para Status de Player [nнvel %d]",adminnamelevel);
                    
SendClientMessage(player1,blue,string);
                    if(
level PlayerInfo[player1][Level]) GameTextForPlayer(player1,"~g~Promovido"20003);
                    else 
GameTextForPlayer(player1,"~r~Rebaixado"20003);
                    
format(string,sizeof(string),"Vocк colocou %s para Nнvel %d em %d/%d/%d аs %d:%d:%d"playernameleveldaymonthyearhourminutesecond); SendClientMessage(playerid,blue,string);
                    
format(string,sizeof(string),"Administrador %s colocou %s para Nнvel %d em %d/%d/%d аs %d:%d:%d",adminnameplayernameleveldaymonthyearhourminutesecond);
                    
SaveToFile("AdminLog",string);
                    
dUserSetINT(PlayerName2(player1)).("level",(level));
                    
PlayerInfo[player1][Level] = level;
                    return 
PlayerPlaySound(player1,1057,0.0,0.0,0.0);
                } else return 
SendClientMessage(playerid,red,"ERRO: O jogador deve estar registado e logado para ser admin");
            } else return 
SendClientMessage(playeridred"Jogador nгo conectado");
        } else return 
SendClientMessage(playerid,red,"ERRO: Vocк nгo tem nнvel alto suficiente para usar este comando");
    } else return 
SendClientMessage(playerid,red,"ERRO: Vocк deve estar logado para usar este comando");

Nгo sei bem se й em Dini, mais algumas partes do filterscript tem Dini.
Crйditos: LethaL Adminscript
Reply


Messages In This Thread
[Error] na org admin ! - by rodrigooo - 15.12.2012, 21:33
Re: [Error] na org admin ! - by lukas_loky - 15.12.2012, 21:56
Re: [Error] na org admin ! - by Diogo123 - 15.12.2012, 21:56
Re: [Error] na org admin ! - by rodrigooo - 15.12.2012, 22:16
Re: [Error] na org admin ! - by Gleisson_. - 16.12.2012, 03:17

Forum Jump:


Users browsing this thread: 1 Guest(s)