Hallo Community,
ich habe da eine Frage, und zwar wie mache ich es das ein Admin, der gerade On Duty ist, bei dem Befehl "/admins" angezeigt wird?
Bin gerade so weit.
if(strcmp(cmd,"/aduty",true) ==0)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(string,sizeof(string),"Admin %s ist nun als Admin On Duty! Er ist Lila markiert.",sendername);
SendClientMessageToAll(0x23FF00FF,string);
SetPlayerColor(playerid,0xFF00F5FF);
}
else
{
SendClientMessage(playerid,COLOR_RED,"Du bist nicht befugt.!");
}
return 1;
}
if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GOLD, "~~~~~~Administratoren~~~~~~");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] == 1337)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "Administrator: %s ", sendername);
SendClientMessage(playerid, COLOR_RED, string);
}
if(PlayerInfo[i][pAdmin] == 4)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "Supporter: %s ", sendername);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
}
if(PlayerInfo[i][pAdmin] == 3)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "Supporter: %s ", sendername);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
}
if(PlayerInfo[i][pAdmin] == 2)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "Moderator: %s ", sendername);
SendClientMessage(playerid, COLOR_GREEN, string);
}
if(PlayerInfo[i][pAdmin] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "Moderator: %s ", sendername);
SendClientMessage(playerid, COLOR_GREEN, string);
}
if(PlayerInfo[i][pSupporter] >= 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "Supporter: %s ", sendername);
SendClientMessage(playerid, COLOR_GREEN, string);
}
}
}
}
return 1;
}
Hoffe jemand kann mir weiter helfen. Mfg
// Edit : Erledigt!
/close