pawn Код:
dcmd_vips(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][LoggedIn] == 1)
{
if(AccInfo[playerid][Level] >= 1)
{
new bool:First2 = false;
new Count, i;
new string[128];
new PlayerName[MAX_PLAYER_NAME];
new adminname[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
Count++;
if(Count == 0)
return ShowPlayerDialog(playerid, 600, DIALOG_STYLE_MSGBOX, "~g~VIPS ONLINE","No VIP players online!","OK","CLOSE");
for(i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
{
if(AccInfo[i][pVip] > 0)
{
switch(AccInfo[i][pVip])
{
case 1: AccType = "Silver";
case 2: AccType = "Gold";
case 3: AccType = "Premium";
}
}
GetPlayerName(i, adminname, sizeof(adminname));
if(!First2)
{
format(string, sizeof(string), "VIP Players: %s (Id:%d) | (%s)", PlayerName, i,AccType);
First2 = true;
}
else format(string,sizeof(string),"%s, %d(%s)", string,i,AccType);
}
return ShowPlayerDialog(playerid, 700, DIALOG_STYLE_MSGBOX);
}
else return ErrorMessages(playerid, 1);
}
else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
ShowPlayerDialog(playerid, 700, DIALOG_STYLE_MSGBOX, "___________ |- Online Admins -| ___________"," ","OK","CLOSE");
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 = "Head 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);
ShowPlayerDialog(playerid, 700, DIALOG_STYLE_MSGBOX);
count++;
}
}
}
if (count == 0)
ShowPlayerDialog(playerid, 800, DIALOG_STYLE_MSGBOX, "~r~ADMINS ONLINE","No Admins online!","OK","CLOSE");
return 1;
}
create a new version of this paste RAW Paste Data
where ~g~ refers to green colour and ~r~ refers to red colour.
HOPE YOU LIKE IT!