Hallo Leute,
ich wollte den /admins Befehl etwas umändern und ja, das Problem ist wenn ich /admins eingebe kommt nur die ID. Aber was ich will ist, das der Rankname steht. Also wie Supporter, Admin oder so.
Hier ist der Befehl
if(strcmp("/admins", cmd, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Admins Online:");
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
if(PlayerInfo[i][pAdmin] >= 1 && AFKModus[i] == 0){
if(PlayerInfo[i][pAdmin] != 0 && PlayerInfo[i][pAdmin] < 1338){
new AdminRangName[25];
if(PlayerInfo[i][pAdmin] == -1){AdminRangName = "Beschwerdemoderator";}
if(PlayerInfo[i][pAdmin] == 1){AdminRangName = "Moderator";}
if(PlayerInfo[i][pAdmin] == 2){AdminRangName = "Supermoderator";}
if(PlayerInfo[i][pAdmin] == 3){AdminRangName = "Supporter";}
if(PlayerInfo[i][pAdmin] == 4){AdminRangName = "Administrator";}
if(PlayerInfo[i][pAdmin] == 5){AdminRangName = "Communitymanager";}
if(PlayerInfo[i][pAdmin] == 6){AdminRangName = "Fraktionsmanager";}
if(PlayerInfo[i][pAdmin] == 1337){AdminRangName = "Headadmin";}
if(PlayerInfo[i][pAdmin] == 1337){AdminRangName = "stellv. Projektleiter";}
if(PlayerInfo[i][pAdmin] == 1337){AdminRangName = "Projektleiter";}
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "%s: %s", AdminRangName, sendername);
SendClientMessage(playerid, COLOR_GREY, string);
}}}}}
else if(PlayerInfo[playerid][pAdmin] != 0){
SendClientMessage(playerid, COLOR_GREY, "Admins Online:");
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
if(PlayerInfo[i][pAdmin] != 0 && PlayerInfo[i][pAdmin] != 2050){
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin: [%d]%s (%d)", i, sendername, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_GREY, string);
}}}}}
return 1;
}
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Admins Online:");
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
if(PlayerInfo[i][pAdmin] >= 1 && AFKModus[i] == 0){
if(PlayerInfo[i][pAdmin] != 0 && PlayerInfo[i][pAdmin] < 1338){
new AdminRangName[25];
if(PlayerInfo[i][pAdmin] == -1){AdminRangName = "Beschwerdemoderator";}
if(PlayerInfo[i][pAdmin] == 1){AdminRangName = "Moderator";}
if(PlayerInfo[i][pAdmin] == 2){AdminRangName = "Supermoderator";}
if(PlayerInfo[i][pAdmin] == 3){AdminRangName = "Supporter";}
if(PlayerInfo[i][pAdmin] == 4){AdminRangName = "Administrator";}
if(PlayerInfo[i][pAdmin] == 5){AdminRangName = "Communitymanager";}
if(PlayerInfo[i][pAdmin] == 6){AdminRangName = "Fraktionsmanager";}
if(PlayerInfo[i][pAdmin] == 1337){AdminRangName = "Headadmin";}
if(PlayerInfo[i][pAdmin] == 1337){AdminRangName = "stellv. Projektleiter";}
if(PlayerInfo[i][pAdmin] == 1337){AdminRangName = "Projektleiter";}
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "%s: %s", AdminRangName, sendername);
SendClientMessage(playerid, COLOR_GREY, string);
}}}}}
else if(PlayerInfo[playerid][pAdmin] != 0){
SendClientMessage(playerid, COLOR_GREY, "Admins Online:");
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
if(PlayerInfo[i][pAdmin] != 0 && PlayerInfo[i][pAdmin] != 2050){
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "Admin: [%d]%s (%d)", i, sendername, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_GREY, string);
}}}}}
return 1;
}
Und wenn ich hier schon was frage, wollt ich mal fragen wie ich das in Dialogen mache oder ob mir das einer macht!
Mit freundlichen Grüßen,
Horizon