CMD:staff(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
SendClientMessage(playerid,COLOR_ORANGE, "Administrators:");
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin])
if(Busy[playerid] == 0)
{
format(string, sizeof(string), "Name: %s Level: %d{1EFF00}(Available)", RPN(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else if(Busy[playerid] == 1)
{
format(string, sizeof(string), "Name: %s Level: %d{FF0000}(Busy)", RPN(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
SendClientMessage(playerid,COLOR_ORANGE, "Moderators:");
foreach(Player, i)
{
if(PlayerInfo[i][pMod])
if(Busy[playerid] == 0)
{
format(string, sizeof(string), "Name: %s{1EFF00}(Available)", RPN(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else if(Busy[playerid] == 1)
{
format(string, sizeof(string), "{FF0000}Name: %s(Busy)", RPN(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
SendClientMessage(playerid,COLOR_ORANGE, "Helpers:");
foreach(Player, i)
{
if(PlayerInfo[i][pHelper])
{
format(string, sizeof(string), "Name: %s", RPN(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
return 1;
}
CMD:astatus(playerid,params[])
{
if(!PlayerInfo[playerid][pAdmin] && !PlayerInfo[playerid][pMod]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(Busy[playerid] == 0)
{
Busy[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You setted your self busy on the staff list");
}
else
{
Busy[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You setted your self Available on the staff list");
}
return 1;
}
CMD:staff(playerid, params[])
{
* * new string[128];
* * if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
* * SendClientMessage(playerid,COLOR_ORANGE, "Administrators:");
* * foreach(Player, i)
* * {
* * * * if(PlayerInfo[i][pAdmin] >= 1)
{
* * * * if(Busy[playerid] == 0)
* * * * {
* * * * * * * * format(string, sizeof(string), "Name: %s Level: %d{1EFF00}(Available)", RPN(i),PlayerInfo[i][pAdmin]);
* * * * * * * * SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
* * * * }
* * * * else if(Busy[playerid] == 1)
* * * * {
* * * * * * * * format(string, sizeof(string), "Name: %s Level: %d{FF0000}(Busy)", RPN(i),PlayerInfo[i][pAdmin]);
* * * * * * * * SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
* * * * *}
}
* * }
* * SendClientMessage(playerid,COLOR_ORANGE, "Moderators:");
* * foreach(Player, i)
* * {
* * * * if(PlayerInfo[i][pMod] >= 1)
{
* * * * if(Busy[playerid] == 0)
* * * * {
* * * * * * * * format(string, sizeof(string), "Name: %s{1EFF00}(Available)", RPN(i));
* * * * * * * * SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
* * * * }
* * * * else if(Busy[playerid] == 1)
* * * * {
* * * * * * * * format(string, sizeof(string), "{FF0000}Name: %s(Busy)", RPN(i));
* * * * * * * * SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
* * * * }
}
* * }
* * SendClientMessage(playerid,COLOR_ORANGE, "Helpers:");
* * foreach(Player, i)
* * {
* * * * if(PlayerInfo[i][pHelper] >= 1)
* * * * {
* * * * * * * * format(string, sizeof(string), "Name: %s", RPN(i));
* * * * * * * * SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
* * * * }
* * }
* * return 1;
}
|
Try this:
pawn Код:
|


CMD:staff(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
SendClientMessage(playerid,COLOR_ORANGE, "Administrators:");
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin])
{
if(Busy[i] == 0) // You were placing "playerid" in Busy[playerid] instead of Busy[i] which only shows that if you're busy, they're all busy.
{
format(string, sizeof(string), "Name: %s Level: %d{1EFF00}(Available)", RPN(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else if(Busy[i] == 1) // Same goes here
{
format(string, sizeof(string), "Name: %s Level: %d{FF0000}(Busy)", RPN(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
SendClientMessage(playerid,COLOR_ORANGE, "Moderators:");
foreach(Player, i)
{
if(PlayerInfo[i][pMod])
{
if(Busy[i] == 0) // Same goes here
{
format(string, sizeof(string), "Name: %s{1EFF00}(Available)", RPN(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else if(Busy[i] == 1) // Same goes here.
{
format(string, sizeof(string), "{FF0000}Name: %s(Busy)", RPN(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
SendClientMessage(playerid,COLOR_ORANGE, "Helpers:");
foreach(Player, i)
{
if(PlayerInfo[i][pHelper])
{
format(string, sizeof(string), "Name: %s", RPN(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
return 1;
}
CMD:astatus(playerid,params[])
{
if(!PlayerInfo[playerid][pAdmin] && !PlayerInfo[playerid][pMod]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(PlayerInfo[playerid][Busy] == 0)
{
Busy[playerid] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You setted your self busy on the staff list.");
}
else if(PlayerInfo[playerid][Busy] == 1)
{
Busy[playerid] = 0;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You setted your self Available on the staff list.");
}
return 1;
}
CMD:staff(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
SendClientMessage(playerid,COLOR_ORANGE, "Administrators:");
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin])
if(PlayerInfo[i][Busy] == 0)
{
format(string, sizeof(string), "Name: %s Level: %d{1EFF00}(Available)", RPN(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else if(PlayerInfo[i][Busy == 1)
{
format(string, sizeof(string), "Name: %s Level: %d{FF0000}(Busy)", RPN(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
SendClientMessage(playerid,COLOR_ORANGE, "Moderators:");
foreach(Player, i)
{
if(PlayerInfo[i][pMod])
if(PlayerInfo[i][Busy] == 0)
{
format(string, sizeof(string), "Name: %s{1EFF00}(Available)", RPN(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else if(PlayerInfo[i][Busy] == 1)
{
format(string, sizeof(string), "{FF0000}Name: %s(Busy)", RPN(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
SendClientMessage(playerid,COLOR_ORANGE, "Helpers:");
foreach(Player, i)
{
if(PlayerInfo[i][pHelper])
{
format(string, sizeof(string), "Name: %s", RPN(i));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
return 1;
}
|
pawn Код:
|