25.05.2016, 10:14
Try this:
Courtesy: Raven's Roleplay Script by Cuervo and NoFear
I found Raven's Roleplay script and thats the code. i already converted it into ZCMD, you just have to change your variables in it to use.
Hope it helps.
EDIT: i fixed /mods command. here:
PHP Code:
CMD:admins(playerid, params[]) // By CuervO_NegrO
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 1338)
{
new admtext[64];
if(PlayerInfo[i][pAdmin] == 1338) { admtext = "Raven's Roleplay Director"; }
else if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Executive Director"; }
else if(PlayerInfo[i][pAdmin] == 6) { admtext = "Head Administrator"; }
else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Senior Administrator"; }
else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Administrator"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Senior Moderator"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Moderator"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Administrative Assitant"; }
else { admtext = "Undefined Rank"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[i][pAdminDuty] == 0 )
{
strcat*string, "%s - %s \n\r" , admtext, sendername);
ShowPlayerDialog(playerid, 3652, DIALOG_STYLE_MSGBOX, "Online Admins:", string, "OK", ""); //Change Dialog Ids according to your server
}
else if(PlayerInfo[i][pAdminDuty] == 1)
{
strcat(string, "%s - %s (On Duty) \n\r", admtext, sendername);
ShowPlayerDialog(playerid, 3652, DIALOG_STYLE_MSGBOX, "Online Admins":, string, "OK", ""); // Change Dialog Ids According to your server.
}
}
}
}
return 1;
}
I found Raven's Roleplay script and thats the code. i already converted it into ZCMD, you just have to change your variables in it to use.
Hope it helps.
EDIT: i fixed /mods command. here:
PHP Code:
CMD:moderators(playerid, params[])
{
new count = 0, string[256];
//SendClientMessage(playerid, blue,"Current online moderators:");
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][Helper] == 1)
{
strcat(string,"Moderator: [%d]%s \n\r", i, PlayerName2(i));
count++;
}
}
}
ShowPlayerDialog(playerid, 542, DIALOG_STYLE_MSGBOX, "Current online Moderators: ", string, "OK", "");
//ShowPlayerDialog(playerid, DIALOG ID, DIALOG STYLE, HEADING, MESSAGE, BUTTON 1, BUTTON 2);
if(count == 0)
{
ShowPlayerDialog(playerid, 542, DIALOG_STYLE_MSGBOX, "Current Online Moderators: ", "No Mods Online!", "OK", "");
}
return 1;
}