[DCMD]Guys please help with my dialog -
donhu789 - 18.11.2013
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
SendClientMessage(playerid, green, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5)
{
AdmRank = "Professional Admin";
ChangeColor = Color_Professional_Admin;
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
ChangeColor = Color_RCON_Administrator;
}
else
{
switch(AccInfo[i][Level])
{
case 1: {
AdmRank = "Basic Moderator";
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 = "Master Administrator";
ChangeColor = Color_Master_Administrator;
}
}
}
switch(AccInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"No admin online in the list");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}
Guys can you help my make this To Dialog i tryed everything but i false please help
-Regards Donhu789 +REPREPREPREP REP REP REP
Re: [DCMD]Guys please help with my dialog -
JeaSon - 18.11.2013
here it is
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
SendClientMessage(playerid, green, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5)
{
AdmRank = "Professional Admin";
ChangeColor = Color_Professional_Admin;
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
ChangeColor = Color_RCON_Administrator;
}
else
{
switch(AccInfo[i][Level])
{
case 1: {
AdmRank = "Basic Moderator";
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 = "Master Administrator";
ChangeColor = Color_Master_Administrator;
}
}
}
switch(AccInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
//SendClientMessage(playerid, ChangeColor, string);
ShowPlayerDialog(playerid,-1,DIALOG_STYLE_MSGBOX,"Online Admins",string,"<>","><");
count++;
}
}
}
if (count == 0)
//SendClientMessage(playerid,red,"No admin online in the list");
ShowPlayerDialog(playerid,-1,DIALOG_STYLE_MSGBOX,"Online Admins","No Admin Online in the list,"<>","><");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}
Re: [DCMD]Guys please help with my dialog -
donhu789 - 18.11.2013
we can strill use SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________"); ?
Re: [DCMD]Guys please help with my dialog -
tuuler - 18.11.2013
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new dia[256];
new ChangeColor;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5)
{
AdmRank = "Professional Admin";
ChangeColor = Color_Professional_Admin;
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
ChangeColor = Color_RCON_Administrator;
}
else
{
switch(AccInfo[i][Level])
{
case 1: {
AdmRank = "Basic Moderator";
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 = "Master Administrator";
ChangeColor = Color_Master_Administrator;
}
}
}
switch(AccInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s\n",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
strcat(dia, string);
ShowPlayerDialog(playerid,ADMINS_LIST,DIALOG_STYLE_MSGBOX,"Online Admins",dia,"Okay","");
count++;
}
}
}
if (count == 0)
ShowPlayerDialog(playerid,ADMINS_LIST,DIALOG_STYLE_MSGBOX,"Online Admins","- No Admins Online" ,"Okay","");
return 1;
}
Re: [DCMD]Guys please help with my dialog -
donhu789 - 18.11.2013
now idk who right :\ can anyone Help :\
Re: [DCMD]Guys please help with my dialog -
tuuler - 18.11.2013
Quote:
Originally Posted by donhu789
now idk who right :\ can anyone Help :\
|
Just try mine...
Re: [DCMD]Guys please help with my dialog -
JeaSon - 18.11.2013
just delete these llines
pawn Код:
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
SendClientMessage(playerid, green, " ");