23.11.2010, 14:01
Hey guys
here is the cmd
When i type /admins im getting spam
Online admins
Linus-[Owner]
Lolipop[Admin]
hahaw[Mod]
How to make it like this?:
Admins: Linus-[Owner], Lolipop[Admin], hahaw[Mod]
Help me please.
Sorry for my bad english
here is the cmd
pawn Код:
new AdmRank[128];
dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] >= 1 && PlayerInfo[i][Level] <= 5 /*&& Hide[i] == 0*/)
{
if(IsPlayerAdmin(playerid)) AdmRank = "RCON Administrator";
else
switch(PlayerInfo[i][Level])
{
case 1: AdmRank = "Basic Moderator";
case 2: AdmRank = "Moderator";
case 3: AdmRank = "Mod";
case 4: AdmRank = "Admin";
case 5: AdmRank = "Owner";
}
format(string, 128, "Admin: %s [%s],",PlayerName2(i), AdmRank);
SendClientMessage(playerid, blue, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"No admin online in the list");
return 1;
}
Online admins
Linus-[Owner]
Lolipop[Admin]
hahaw[Mod]
How to make it like this?:
Admins: Linus-[Owner], Lolipop[Admin], hahaw[Mod]
Help me please.
Sorry for my bad english