02.11.2017, 20:28
PHP код:
enum pInfo
{
Administrador,
bool:conectado
}
new Player[MAX_PLAYERS][pInfo];
new AdminNivel[50];
new AdminOnline[50];
#define DIALOG_ADMIN 1
#define DIALOG_NOADMIN 2
PHP код:
CMD:administradores(playerid, params[])
{
new string[180], Nenhum, nAdmin[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Player[i][Administrador] > 0)
{
GetPlayerName(i, nAdmin, 32);
if(Player[i][Administrador] AdminNivel = "Ajudante");
if(Player[i][Administrador] == 2) AdminNivel = "Moderador(a)");
if(Player[i][Administrador] == 3) AdminNivel = "Administrador(a)");
if(Player[i][Administrador] == 4) AdminNivel = "Programador(a)");
if(Player[i][AdminOnline] == true) AdminOnline = "Conectado");
format(string, sizeof(string), "{FFFFFF}Nome\tNнvel\tStatus\n%s\t%s\s%s", nAdmin, AdminNivel, AdminOnline);
ShowPlayerDialog(playerid, DIALOG_ADMIN, DIALOG_STYLE_TABLIST_HEADERS, "{FF0000}Administradores", string, "{FFFFFF}Fechar", "");
Nenhum++;
}
if(Nenhum == 0)
{
ShowPlayerDialog(playerid, DIALOG_NOADMIN, DIALOG_STYLE_MSGBOX, "{FF0000}Administradores", "{FF0000}Nгo hб administradores(a) online", "{FFFFFF}Fechar", ""
}
return 1;
}
PHP код:
error 001: expected token: ")", but found "-identifier-"
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line