Ich habe mich als Adminlevel 5 gemacht.
Aber wenn ich jetzt im Spiel eingebe /admins wir mir Adminlevel 1 Moderrator angezeigt.
ocmd:admins(playerid,params[])
{
#pragma unused params
SendClientMessage(playerid, BLAU, "|______Supporter / Administratoren Online:______|");
new i = 0, aname[256], string[256];
for(; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(isPlayerAnAdmin(i,1))
{
GetPlayerName(i, aname, sizeof(aname));
format(string, 256, " Moderrator: %s", aname);
SendClientMessage(playerid, GRAU, string);
}
else if(isPlayerAnAdmin(i,2))
{
GetPlayerName(i, aname, sizeof(aname));
format(string, 256, " Supporter: %s", aname);
SendClientMessage(playerid, GRAU, aname);
}
else if(isPlayerAnAdmin(i,3))
{
GetPlayerName(i, aname, sizeof(aname));
format(string, 256, " Super Supporter: %s", aname);
SendClientMessage(playerid, GRAU, string);
}
else if(isPlayerAnAdmin(i,4))
{
GetPlayerName(i, aname, sizeof(aname));
format(string, 256, " Administrator: %s", aname);
SendClientMessage(playerid, GRAU, string);
}
else if(isPlayerAnAdmin(i,5))
{
GetPlayerName(i, aname, sizeof(aname));
format(string, 256, " Projektleiter: %s", aname);
SendClientMessage(playerid, GRAU, string);
}
}
}
return 1;
}
Meine Adminabfrage sieht so aus:
stock isPlayerAnAdmin(playerid,rang)
{
if(GetPVarInt(playerid,"Adminlevel")>=rang)return 1;
return 0;
}
/Edit