[help]komande /admins i /leaders

Započeo [YE]exNip, Avgust 08, 2009, 23:43:54 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Pozz ljudi,
moze mi netko pomoci kako da napravim komande /admins i /leaders molim vas!

znao sam da cemo se i mi sresti smail  :D

#define AdminRank1 "Server Moderator"
#define AdminRank2 "Roleplay Administrator"
#define AdminRank3  "Game Administrator"
#define AdminRank4  "Senior Game Admin"
#define AdminRank5  "RP/Forum Supervisor"
#define AdminRank6  "Admin Supervisor"
#define AdminRank7  "Server Supervisor"
#define AdminRank8  "Server Owner"

if(strcmp(cmd, "/admins", true) == 0)
{
    new result[64];
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_GREEN, "_______________Admins_______________");
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(playerid))
            {
            SendClientMessage(playerid, COLOR_GRAD1, " ");
      if(PlayerInfo[playerid][pAdmin] == 1){ format(string, sizeof(string), "* %s %s: %s", AdminRank1, GetPlayerNameEx(playerid), result); }
else if(PlayerInfo[playerid][pAdmin] == 2){ format(string, sizeof(string), "* %s %s: %s", AdminRank2, GetPlayerNameEx(playerid), result); }
else if(PlayerInfo[playerid][pAdmin] == 3){ format(string, sizeof(string), "* %s %s: %s", AdminRank3, GetPlayerNameEx(playerid), result); }
else if(PlayerInfo[playerid][pAdmin] == 4){ format(string, sizeof(string), "* %s %s: %s", AdminRank4, GetPlayerNameEx(playerid), result); }
else if(PlayerInfo[playerid][pAdmin] == 5){ format(string, sizeof(string), "* %s %s: %s", AdminRank5, GetPlayerNameEx(playerid), result); }
else if(PlayerInfo[playerid][pAdmin] == 6){ format(string, sizeof(string), "* %s %s: %s", AdminRank6, GetPlayerNameEx(playerid), result); }
else if(PlayerInfo[playerid][pAdmin] == 7){ format(string, sizeof(string), "* %s %s: %s", AdminRank7, GetPlayerNameEx(playerid), result); }
else if(PlayerInfo[playerid][pAdmin] == 1337){ format(string, sizeof(string), "* %s %s: %s", AdminRank8, GetPlayerNameEx(playerid), result); }
SendClientMessage(playerid, COLOR_GRAD1, string);
SendClientMessage(playerid, COLOR_GRAD1, " ");
}
}
SendClientMessage(playerid, COLOR_GREEN, "_____________________________________");
}
return 1;
}


Ovo ti je za admine /admins...

if(strcmp(cmd, "/leaders", true) == 0)
            {
            SendClientMessage(playerid,COLOR_GREEN, "Online Leaders:");
            new LeadersOnline;
             for(new i; i < MAX_PLAYERS; i++)
                    {
                    if(IsPlayerConnected(i))
                    {
                    if(PlayerInfo[playerid][pLeader] >= 1)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Police: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               }
                if(PlayerInfo[playerid][pLeader] >= 2)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* FBI: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               }
                if(PlayerInfo[playerid][pLeader] >= 3)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* National Guards: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               }
                if(PlayerInfo[playerid][pLeader] >= 4)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Emergency: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               }
               if(PlayerInfo[playerid][pLeader] >= 5)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* La Cosa Nostra: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               }
               if(PlayerInfo[playerid][pLeader] >= 6)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Yakuza: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               }
               if(PlayerInfo[playerid][pLeader] >= 7)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Mayor: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               }
               if(PlayerInfo[playerid][pLeader] >= (8 write only 8, if i write that show the animation)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Hitmans: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               }
               if(PlayerInfo[playerid][pLeader] >= 9)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* News Reporter: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               }
               if(PlayerInfo[playerid][pLeader] >= 10)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Taxi Cab: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               }
               if(PlayerInfo[playerid][pLeader] >= 11)
                {
                   new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* License System: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);
               return 1;
            }
         }
      }
    if(LeadersOnline == 0)
      {
          SendClientMessage(playerid, COLOR_GREEN, "[____________________________________].");
      }
   return 1;
}


Ovo za lidere, /leaders... ako imas vise od 11 org(banda), tad samo dodas jos jednom
                   
if(PlayerInfo[playerid][pLeader] >= 10)
                {
new LeaderName[MAX_PLAYER_NAME];
                   GetPlayerName(i, LeaderName, sizeof(LeaderName));
               format(string, sizeof(string), "* Taxi Cab: %s", LeaderName);
                   SendClientMessage(playerid, COLOR_GREY, string);


umjesto taxi cab stavis neku bandu, org.. i umjesto 10 stavis broj bande, organizacije.
***Genius Gaming RPG Server Owner***



matejdz