Help With Dialogs
#6

Try this:
PHP Code:
CMD:admins(playeridparams[])   // By CuervO_NegrO
    
{
        if(
IsPlayerConnected(playerid))
        {
            for(new 
0MAX_PLAYERSi++)
            {
                if(
IsPlayerConnected(i))
                {
                    if(
PlayerInfo[i][pAdmin] >= && 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(isendernamesizeof(sendername));
                        if(
PlayerInfo[i][pAdminDuty] == )
                        {
                            
strcat*string,  "%s - %s \n\r" admtextsendername);
                            
ShowPlayerDialog(playerid3652DIALOG_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"admtextsendername);
                            
ShowPlayerDialog(playerid3652DIALOG_STYLE_MSGBOX"Online Admins":, string"OK"""); // Change Dialog Ids According to your server.
                        
}
                }
            }
        }
        return 
1;
    } 
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:moderators(playeridparams[])
{
   new 
count 0string[256];
   
//SendClientMessage(playerid, blue,"Current online moderators:");
   
for(new 0MAX_PLAYERS++)
   {
      if(
IsPlayerConnected(i))
      {
          if(
PlayerInfo[i][Helper] == 1)
          {
             
strcat(string,"Moderator: [%d]%s \n\r"iPlayerName2(i));
             
count++;
          }
          
      }
   }
  
ShowPlayerDialog(playerid542DIALOG_STYLE_MSGBOX"Current online Moderators: "string"OK""");
          
//ShowPlayerDialog(playerid, DIALOG ID, DIALOG STYLE, HEADING, MESSAGE, BUTTON 1, BUTTON 2);
   
if(count == 0)
   {
          
ShowPlayerDialog(playerid542DIALOG_STYLE_MSGBOX"Current Online Moderators: ""No Mods Online!""OK""");
   }
   return 
1;

Reply


Messages In This Thread
Help With Dialogs - by WatchDog - 24.05.2016, 15:24
Re: Help With Dialogs - by GTLS - 24.05.2016, 16:06
Re: Help With Dialogs - by GTLS - 24.05.2016, 17:02
Re: Help With Dialogs - by WatchDog - 25.05.2016, 04:39
Re: Help With Dialogs - by ManIsHere - 25.05.2016, 10:01
Re: Help With Dialogs - by GTLS - 25.05.2016, 10:14
Re: Help With Dialogs - by TheseMan - 25.05.2016, 10:35
Re: Help With Dialogs - by GTLS - 26.05.2016, 13:21
Re: Help With Dialogs - by ilijap - 26.05.2016, 13:41

Forum Jump:


Users browsing this thread: 1 Guest(s)