05.03.2013, 23:11
Buenas, tengo el cmd /admins, que configurй para que saliera un nombre especнfico para cada nivel de administraciуn, pero cuando pongo el comando sale que todos son "Admin de prueba".
Serнa una gran ayuda que me dijeran en que fallй.
De antemano gracias.
____
Serнa una gran ayuda que me dijeran en que fallй.
De antemano gracias.
____
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new cantidadadmins, titulo[128], admins[512];
for(new i=0; i < MAX_PLAYERS; i++)
{
if (PlayerInfo[i][Level] >= 1 || IsPlayerAdmin(i)) cantidadadmins++;
}
if (cantidadadmins == 0) return SendClientMessage(playerid, red, "Lamentablemente, no hay administradores conectados.");
format(titulo, 128, "{FFFF00}Administraciуn conectada (C: %d)", cantidadadmins);
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] >= 1)
{
new string[256];
format(string, sizeof(string), "{66CCCC}%s {FFFFFF}- {66CC00}Nivel %d {FFFFFF}- {00FFFF}Admin de Prueba\n", PlayerName2(i), PlayerInfo[i][Level]);
strcat(admins, string);
}
else if(PlayerInfo[i][Level] >= 2)
{
new string[256];
format(string, sizeof(string), "{66CCCC}%s {FFFFFF}- {66CC00}Nivel %d {FFFFFF}- {CC6600}Moderador\n", PlayerName2(i), PlayerInfo[i][Level]);
strcat(admins, string);
}
else if(PlayerInfo[i][Level] >= 3)
{
new string[256];
format(string, sizeof(string), "{66CCCC}%s {FFFFFF}- {66CC00}Nivel %d {FFFFFF}- {00FF00}Admin\n", PlayerName2(i), PlayerInfo[i][Level]);
strcat(admins, string);
}
else if(PlayerInfo[i][Level] >= 4)
{
new string[256];
format(string, sizeof(string), "{66CCCC}%s {FFFFFF}- {66CC00}Nivel %d {FFFFFF}- {0000FF}Admin Cabecilla\n", PlayerName2(i), PlayerInfo[i][Level]);
strcat(admins, string);
}
else if(PlayerInfo[i][Level] >= 5)
{
new string[256];
format(string, sizeof(string), "{66CCCC}%s {FFFFFF}- {66CC00}Nivel %d {FFFFFF}- {990033}Co Creador\n", PlayerName2(i), PlayerInfo[i][Level]);
strcat(admins, string);
}
else if(PlayerInfo[i][Level] >= 6)
{
new string[256];
format(string, sizeof(string), "{66CCCC}%s {FFFFFF}- {66CC00}Nivel %d {FFFFFF}- {FF0000}Creador\n", PlayerName2(i), PlayerInfo[i][Level]);
strcat(admins, string);
}
else if(IsPlayerAdmin(i))
{
new string[256];
format(string, sizeof(string), "{66CCCC}%s {FFFFFF}- {66CC00}Nivel %d {FFFFFF}- {FF0000}Admin RCON\n", PlayerName2(i), PlayerInfo[i][Level]);
strcat(admins, string);
}
ShowPlayerDialog(playerid, DIALOGO_NULL, DIALOG_STYLE_MSGBOX, titulo, admins, "Aceptar", "" );
}
}
return 1;
}