16.12.2015, 05:12
(
Последний раз редактировалось Tween73; 02.01.2016 в 19:46.
Причина: removed
)
removed
HelpMe Bad Bug /admins
Код:
CMD:admins(playerid, params[]) { //1 SendClientMessage(playerid, COLOR_GREEN, "Administrators online 1"); foreach(Player, i) { new Rank1[128],Rank2[128], string[128]; if(PlayerInfo[playerid][pAdmin] > 0) { switch(PlayerInfo[i][pAdmin]) { case 9: Rank1 = "Owner"; } new pName1[MAX_PLAYER_NAME]; GetPlayerName(i, pName1, sizeof(pName1)); format(string, sizeof(string), "%s %s [Id:%d] %s",Rank1,pName1,i,PlayerInfo[i][pAdmin]); SendClientMessage(playerid, COLOR_RED, string); } //2 if(PlayerInfo[playerid][pAdmin] > 0) SendClientMessage(playerid, COLOR_GREEN, "Administrators online 2"); { switch(PlayerInfo[i][pAdmin]) { case 1: Rank2 = "Moderator"; case 2: Rank2 = "Master Moderator"; case 3: Rank2 = "Admin"; case 4: Rank2 = "Master Admin"; case 5: Rank2 = "Developer"; case 6: Rank2 = "Web Developer"; case 7: Rank2 = "Leader"; case 8: Rank2 = "Co-Leader"; } new pName2[MAX_PLAYER_NAME]; GetPlayerName(i, pName2, sizeof(pName2)); format(string, sizeof(string), "%s %s [Id:%d] %s",Rank2,pName2,i,PlayerInfo[i][pAdmin]); SendClientMessage(playerid, COLOR_RED, string); } } return 1; } |
CMD:admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
SendClientMessage(playerid, -1, " ");
SendClientMessage(playerid, -1, "Online Administator");
SendClientMessage(playerid, -1, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1)
{
if(PlayerInfo[i][pAdmin] > 9)
{
Rank = "Owner";
}
if(IsPlayerAdmin(i))
{
Rank = "RCON Administrator";
}
else
{
switch(PlayerInfo[i][pAdmin])
{
case 1:{ Rank = "Moderator"; }
case 2:{ Rank = "Master Moderator"; }
case 3:{ Rank = "Admin"; }
case 4:{ Rank = "Master Admin"; }
case 5:{ Rank = "Developer"; }
case 6:{ Rank = "Web Developer"; }
case 7:{ Rank = "Leader"; }
case 8:{ Rank = "Co-Leader"; }
}
}
format(string, 128, "Level: %d - %s(%i) | %s |",PlayerInfo[i][pAdmin], Names(i),i,Rank);
SendClientMessage(playerid, -1, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,-1,"No Administrator Online");
SendClientMessage(playerid, -1, " _______________________________________");
return 1;
}
stock Names(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}