Admins Dialog?
#1

Hello, can i convert this code to admins

Quote:

CMD:vips(playerid, params[])
{
#pragma unused params
new
count = 0,
string[800];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if (Vip[playerid] >= 1)
{
format(string, 500, "%s %s [ID:%i] | VIP Level: %d\n", string, PlayerName(i), i, Vip[playerid]);
count++;
}
}
}
if (count == 0) ShowPlayerDialog(playerid, 800, DIALOG_STYLE_MSGBOX, "{F81414}Online V.I.Ps", "{00FFEE}No V.I.Ps Online", "Close", "");
else ShowPlayerDialog(playerid, 800, DIALOG_STYLE_MSGBOX, "{F81414}Online V.I.Ps", string, "Close", "");
return 1;
}

Exactly like it just for admins my admin system Xtremeadmin

So this is the code Dcmd

Quote:

dcmd_admins(playerid,params[]) {
#pragma unused params
new Count,i,name[24],string[256];
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerXAdmin(i)) Count++;
if(!Count) return SendClientMessage(playerid,green,"Admins Online: None");
if(Count == 1) {
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerXAdmin(i)) break;
GetPlayerName(i,name,24); format(string,256,"Admins Online: %s (%d)",name,Variables[i][Level]);
return SendClientMessage(playerid,green,string);
}
if(Count >= 1) {
new bool:First = false;
for(i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && IsPlayerXAdmin(i)) {
GetPlayerName(i,name,24);
if(!First) { format(string,256,"Admins Online: %s (%d),",name,Variables[i][Level]); First = true; }
else format(string,256,"%s %s (%d)",string,name,Variables[i][Level]);
}
return SendClientMessage(playerid,green,string);
}
return 1;
}

I need the vip one for admins nothing else just can any one make it pls?
Reply
#2

pawn Код:
CMD:vips(playerid, params[])
{
#pragma unused params
new
count = 0,
string[800];
if(IsPlayerXAdmin(playerid))
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if (Vip[playerid] >= 1)
{
format(string, 500, "%s %s [ID:%i] | VIP Level: %d\n", string, PlayerName(i), i, Vip[playerid]);
count++;
}
}
}
if (count == 0) ShowPlayerDialog(playerid, 800, DIALOG_STYLE_MSGBOX, "{F81414}Online V.I.Ps", "{00FFEE}No V.I.Ps Online", "Close", "");
else ShowPlayerDialog(playerid, 800, DIALOG_STYLE_MSGBOX, "{F81414}Online V.I.Ps", string, "Close", "");
}
return 1;
}
Reply
#3

Not working
Reply
#4

Do you get any errors/warnings?
Does it show the dialog?
Give some further details.
Reply
#5

4 Errors

I Want it dcmd if you can that's might work!
Reply
#6

Paste the error here.

pawn Код:
CMD:vips(playerid, params[])
->
pawn Код:
dcmd_vips(playerid, params[])
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)