03.12.2014, 18:38
Okay, let me help you, add on the PlayerInfo enum "Busy". Not sure if it works, because I did not test it!
Then replace the old astatus with this one:
And then replace staff command with this one:
Then replace the old astatus with this one:
Код:
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;
}

