[PEDIDO] /admins
#1

Bom, como o cmd ja deve dizer, quero o cmd /admins > dai mostra os admins q estao online;

- Eu sei que tem no Search, sу que ja testei eles no meu gamemode e nada, entao queria um decente dessa vez..
Reply
#2

tem no cуdigo na seзгo Cуdigos.

Ou
pawn Код:
if(!strcmp(cmdtext, "/admins", true))
{
     new Jogador[24];
     new count = 0;
     new msg[120];
     for(new i=0; i<MAX_PLAYERS; i++)
     {
          if(IsPlayerConnected(i) && IsPlayerAdmin(i))
          {
               GetPlayerName(i,Jogador,24);
               format(msg,sizeof(msg),"Admins Online: %s", Jogador);
               SendClientMessage(playerid, 0x000FFFAA, msg);
               count++;
          }
     }
     if(count == 0) return  SendClientMessage(playerid, COR_VERMELHO, "Nгo tem nenhum adminstrador online agora!");
     return true;
}
Reply
#3

pawn Код:
stock Admins(playerid){
    new string[100];
    for(new i; i <MAX_PLAYERS; i++) {
    if(IsPlayerAdmin(i){
    format(string, sizeof(string), "Admins: %s",PlayerName(i));
    SendClientMessage(playerid,0,string);
    }
}

stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    return name;
}
Reply
#4

pawn Код:
if(strcmp("/admins", cmdtext, true) == 0)
{
    new string[128], Name[MAX_PLAYER_NAME];
    SendClientMessage(playerid, 0xFF4040AA, "Admins Online:");
    for(new i = 0; i < MAX_PLAYERS; ++i)
    {
        if(IsPlayerAdmin(i))
        {
            GetPlayerName(i, Name, sizeof Name);
            format(string, sizeof string, "%s [Admin RCON]" Name);  
            SendClientMessage(playerid, 0xFFFFFFAA, string);
        }
    }
    return true;
}
PS: Nгo vi que jб tinham postado.
Reply
#5

GF
pawn Код:
if (strcmp(cmd, "/admins", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, 0xB4B5B7FF, "Admins Online:");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1338)
                    {
                        GetPlayerName(i, sendername, sizeof(sendername));
                        format(string, 256, "Admin: %s", sendername);
                        SendClientMessage(playerid, 0xBFC0C2FF, string);
                    }
                }
            }
        }
        return 1;
    }
Creditos ao Drakon
pawn Код:
//-----------------------------Admins Online--------------------------
if(strcmp(cmdtext, "/admins", true) == 0){
new Jogador[24];
new count = 0;
new msg[120];
new ListaAdmins[128];
for(new i=0; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
GetPlayerName(i,Jogador,24);
format(msg,sizeof(msg),"Admins Online's: %s", Jogador);
SendClientMessage(playerid, 0x000FFFAA, msg);
count++;
}
}
if(count >= 0){
SendClientMessage(playerid, ADMINFS_MESSAGE_COLOR, "Admins Off");
dini_IntSet (ListaAdmins, "Admins", 1);
SendClientMessage(playerid, ADMINFS_MESSAGE_COLOR, ListaAdmins);
}
return 1;
}
[ RJJ ] Espero ter ajudado [/ rjj] briqs
Reply
#6

thanks garfiel, Esse seu ai ta funfando 100%, vlws.
Reply
#7

[ RJJ ] Espero Ter Ajudado [/ RJJ ]І

Brink's
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)