03.12.2014, 17:22
Okay.. I created a Available/Busy Command for the admins on the staff list In Game.. But its kinda bugged.. if you do /astatus it says that you are Busy.. But the whole Staff team is Busy then,. Same as by Availabe, how can i create it that everyplayer can see for his self who is available and not available(sorry for my bad english) +rep if you help me
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[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;
}
pawn Код:
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;
}