Komanda /admins

Započeo Eagle Luka, Mart 24, 2012, 19:36:18 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Eagle Luka

Editujem mod CLRP i želeo bih da promenim komandu /admins ali mi neide.
Evo slike kako bih hteo da izgleda komanda :
http://www.zaslike.com/viewer.php?file=tpqctfpdhz1v48jgi6dy.png
takodje bih zeleo da mi poruke dole izledaju kao na slici u iznacenoo  polju , unapred hvala.
:)

daj /admins komandu
btw makni sliku je tako reklamiras zabranjen server

Eagle Luka

if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/admini", true) == 0)
   {
        if(IsPlayerConnected(playerid))
       {
      new count = 0; new ime[MAX_PLAYER_NAME];
      SendClientMessage(playerid, SVETLOPLAVA, "__________Online Administratori__________");
      for(new i; i< MAX_PLAYERS; i++)
      {
         if(IsPlayerConnected(i))
         {
            if(PlayerInfo[pAdmin] >= 1 && PlayerInfo[pAdmin] < 1338)
            {
               GetPlayerName(i, ime, sizeof(ime));
               format(string, sizeof(string), "{F81414}Admin: {FFFFFF}%s | {00C0FF}Level: {FFFFFF}%d", ime, PlayerInfo[pAdmin])
               SendClientMessage(playerid, WHITE, string);
               count++;
            }
         }
      }
      if(count == 0)
      {
         SendClientMessage(playerid, COLOR_YELLOW, ""COL_RED"   Nijedan admin nije online!");
         return 1;
      }
      //SendClientMessage(playerid, SVETLOPLAVA, "_________________________________________");
   }
   return 1;
}




ETo

probaj ovako, ...
if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/admini", true) == 0)
{
        if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, SVETLOPLAVA, "__________Online Admin's__________");
foreach (Player, i)
{
    if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1338)
    {
    new admtext[256];
    if(PlayerInfo[i][pAdmin] == 1337) { admtext = "1337"; }
    else if(PlayerInfo[i][pAdmin] == 4) { admtext = "4"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "3"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "2"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "1"; }
else { admtext = "1"; }
GetPlayerName(i, sendername, sizeof(sendername));
if(AdminDuty[i] == 1)
{
    format(string, 256, "{F81414}[NA DUZNOSTI]Admin: {FFFFFF}%s | {00C0FF}Level: {FFFFFF}", sendername, admtext);
ShowPlayerDialog(i, 999, DIALOG_STYLE_MSGBOX,"{F81414}Administracija",string,"U redu","");
}
else
{
format(string, 256, "{F81414}Admin: {FFFFFF}%s | {00C0FF}Level: {FFFFFF}%s ", sendername, admtext);
ShowPlayerDialog(i, 998, DIALOG_STYLE_MSGBOX,"{F81414}Administracija",string,"U redu","");
}
}
}
}
return 1;
}

Eagle Luka


Opomena obojici zbog ne citanja pravila.
LOCK !