08.03.2013, 12:15
Hello, can i convert this code to admins
Exactly like it just for admins my admin system Xtremeadmin
So this is the code Dcmd
I need the vip one for admins nothing else just can any one make it pls?
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; } |
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; } |