17.12.2016, 21:48
Fiz um admins por dialog em zcmd e por algum motivo nгo aparece o dialog. E sim, jб defini ele.
/admins:
admin:
/admins:
PHP код:
CMD:admins(playerid, params[])
{
new s[2500], ss[2500], iname[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(aInfo[i][Admin] == 1 || aInfo[i][Moderador] == 1 || aInfo[i][Ajudante] == 1 || aInfo[i][AdminL] == 1)
{
GetPlayerName(i, iname, sizeof(iname));
format(ss, 2500, "{FFFFFF}%s[%d] %s \n", iname, i, admin(i));
strcat(s, ss);
}
}
ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "Administradores online:", s, "Fechar", "");
return 1;
}
PHP код:
admin(id)
{
new String[64], iname[MAX_PLAYER_NAME];
GetPlayerName(id, iname, sizeof(iname));
if(aInfo[id][Admin] == 1)
String = "Administrador";
else if(aInfo[id][Moderador] == 1)
String = "Moderador";
else if(aInfo[id][Ajudante] == 1)
String = "Ajudante";
else if(aInfo[id][AdminL] == 1)
String = "Desenvolvedor";
return String;
}