03.03.2013, 21:43
The dialog will only show one person at any given time and shows people whose stats aren't even admin.
Can someone fix both of these issues?
Can someone fix both of these issues?
pawn Код:
CMD:admins(playerid, params[]){
for(new i = 0;i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pStats[i][Admin] >= 0)
{
new str[128],duty[32];
switch(Duty[i]){
case 0: format(duty,sizeof(duty),"(Off duty)");
case 1: format(duty,sizeof(duty),"{FF6347}(On duty)");
}
format(str,sizeof(str),"%s %s %s\n",GetAdmin(i),GetName(i),duty);
ShowPlayerDialog(playerid,10,0,"Administration",str,"Close","");
}
else{
ShowPlayerDialog(playerid,11,0,"Administration","There's no administrators online.","Close","");
}
}
}
return 1;
}