23.10.2012, 17:00
hey everyone,
i have this /admins cmd, but the string is too small, when it pupups the dialog, it shows 1 admin, and the second for a part, then the string is ended and too small, but there must be a better way for this, cuz i dont wanna make my string like 9999 bigg...
greets niels
i have this /admins cmd, but the string is too small, when it pupups the dialog, it shows 1 admin, and the second for a part, then the string is ended and too small, but there must be a better way for this, cuz i dont wanna make my string like 9999 bigg...
pawn Код:
CMD:admins(playerid, params[])
{
new count = 0;
new string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][AdminLevel] >= 1)
{
if(IsPlayerAdmin(i))
{
AdmRank = "{FF0000}RCON {FFFFFF}Administrator";
}
else
{
switch(PlayerInfo[i][AdminLevel])
{
case 1:
{
AdmRank = "{00FF00}Trial {FFFFFF}Admin";
}
case 2:
{
AdmRank = "{FFFFFF}Basic {FF0000}Moderator";
}
case 3:
{
AdmRank = "{FF0000}Moderator";
}
case 4:
{
AdmRank = "Master {FF0000}Moderator";
}
case 5:
{
AdmRank = "{FFFFFF}Administrator";
}
case 6:
{
AdmRank = "{FF0000}Master {FFFFFF}Administrator";
}
case 7:
{
AdmRank = "{00FF00}Professional {FFFFFF}Administrator";
}
case 8:
{
AdmRank = "{0000FF}Server {FFFFFF}Mapper";
}
case 9:
{
AdmRank = "{0000FF}Server {FFFFFF}Beta Tester";
}
case 10:
{
AdmRank = "{0000FF}Server {00FF00}Owner";
}
}
}
new file[300];
new name[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(file,sizeof(file),"nAdmin/Users/%s.ini",name);
PlayerInfo[i][AdminLevel] = dini_Int(file, "AdminLevel");
format(string, sizeof(string), "%s{FF00FF}Level: {FF0000}%d {FF00FF}- {00FF00}%s (Id:{FF0000}%i{00FF00}) {FF00FF}| %s \n",string, PlayerInfo[i][AdminLevel], PlayerName2(i),i,AdmRank);
ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "[!] Online Admins", string, "OK", "");
count++;
}
}
}
if (count == 0)
{
ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "[!] Online Admins", "No online admins", "OK", "");
}
return 1;
}