[Ajuda] Comando com rcon
#4

assim o cara pode ser rcon ou adm level 5 para setar adm em alguem

pawn Код:
COMMAND:daradmin(playerid, params[])
{
    new OtherPlayer, Level, Msg[128], Name[24], AdminName[24], OldLevel;

    SendAdminText(playerid, "/daradm", params);

    if (APlayerData[playerid][LoggedIn] == true)
    {
        if (APlayerData[playerid][PlayerLevel] >= 5 || IsPlayerAdmin(playerid))
        {
            if (sscanf(params, "ud", OtherPlayer, Level)) return SendClientMessage(playerid, 0xFF0000AA, "Digite: \"/daradm <Player> <AdminLevel>\"");
            if (IsPlayerConnected(OtherPlayer))
            {
                OldLevel = APlayerData[OtherPlayer][PlayerLevel];
                GetPlayerName(playerid, AdminName, sizeof(AdminName));
                GetPlayerName(OtherPlayer, Name, sizeof(Name));
                APlayerData[OtherPlayer][PlayerLevel] = Level;
                if (OldLevel != Level)
                {
                    if (OldLevel < Level) format(Msg, 128, "{00FF00}-|O Player {FFFFFF}%s {00FF00}Foi Promovido a {FFFFFF}%s {00FF00}por {FFFFFF}%s{00FF00}|-", Name, AdminLevelName[Level], AdminName);
                    if (OldLevel > Level) format(Msg, 128, "{FF0000}-|O Player{FFFFFF} %s {FF0000}Foi Rebaixado a {FFFFFF}%s por {FFFFFF}%s{FF0000}|-", Name, AdminLevelName[Level], AdminName);
                    SendClientMessageToAll(0x00FFFFFF, Msg);
                }
                else return SendClientMessage(playerid, 0xFF0000FF, "O Level de outro Jogador nao Foi Alterado");
            }
            else  return SendClientMessage(playerid, 0xFF0000FF, "O Player nao esta Online");
        }
    }
    return 1;
}
Reply


Messages In This Thread
Comando com rcon - by Luucass - 29.08.2013, 14:20
Re: Comando com rcon - by cawlv - 29.08.2013, 14:42
Re: Comando com rcon - by xxRaioxx - 29.08.2013, 16:33
Re: Comando com rcon - by PT - 29.08.2013, 16:53

Forum Jump:


Users browsing this thread: 3 Guest(s)