19.11.2011, 12:12
hello!
I am using luxadmin system,in that i modified /admins like this
I added ShowPlayerDialog instead of SendClientMessage
And after that when anyone type /admins ,then only 1 admin name will be shown in Dialog Box.Please help me to fix this..
I am using luxadmin system,in that i modified /admins like this
pawn Код:
CMD:admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] >= 1 && PlayerInfo[i][Hide] == 0)
{
if(PlayerInfo[i][Level] > 6)
{
AdmRank = "Professional Admin";
ChangeColor = Color_Professional_Admin;
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
ChangeColor = Color_RCON_Administrator;
}
else
{
switch(PlayerInfo[i][Level])
{
case 1: {
AdmRank = "VIP";
ChangeColor = Color_Basic_Moderator;
}
case 2: {
AdmRank = "Moderator";
ChangeColor = Color_Moderator;
}
case 3: {
AdmRank = "Master Moderator";
ChangeColor = Color_Master_Moderator;
}
case 4: {
AdmRank = "Administrator";
ChangeColor = Color_Administrator;
}
case 5: {
AdmRank = "Head Administrator";
ChangeColor = Color_Master_Administrator;
}
case 6: {
AdmRank = "Professional Admin";
ChangeColor = Color_Master_Administrator;
}
}
}
switch(PlayerInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",PlayerInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
ShowPlayerDialog(playerid,53,DIALOG_STYLE_MSGBOX,"{00FF19}Online Administrators",string,"OK","");
count++;
}
}
}
if (count == 0)
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{00FF19}Online Administrators","{FF0202}No admin online in the list","Close","");
return 1;
}
pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{00FF19}Online Administrators","{FF0202}No admin online in the list","Close","");