Hey bei meinem Dialog wird immer nur ein Admin angezeigt obwohl 2 online sind was ist falsch? oO
ocmd:admins(playerid,params[])
{
new text[100];
new string[128],name[MAX_PLAYER_NAME],var,level;
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && isPlayerAnAdmin(i,1))
{
if(GetPVarInt(i,"Adminlevel")==1) {text = "Moderator"; }
if(GetPVarInt(i,"Adminlevel")==2) {text = "Lite Admin"; }
if(GetPVarInt(i,"Adminlevel")==3) {text = "Admin"; }
if(GetPVarInt(i,"Adminlevel")==4) {text = "Full Admin"; }
if(GetPVarInt(i,"Adminlevel")==5) {text = "Server Leader"; }
format(string, sizeof(string), "{F5FF00}%s (ID: %d) - {2DFF00}Level %d {F00000}(%s)",PlayerName(i),playerid,GetPVarInt(i,"Adminlevel"),text);
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"{F00000}Admins",string,"Ok","");
var++;
}
}
if(!var)
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"{F00000}Admins","{F00000}Zur Zeit sind keine Admins online!","Ok","");
return 1;
}
Hat wohl was mit der Schleife bzw dem string zu tun.