Jump to content

admin with levels behind their names


QuickBreakdown

Recommended Posts

I want that if i type !admins then it says: the online admins ... I have the script already for that. its under this... and the the level behind it so like ..... Online Admin(s) : Recon (Level: 10)

 elseif ($3 == !admin) || ($3 == !admins) { 
    var %aa = 0,%bb,%cc,%dd 
    while (%aa <= $mta.server($1).cmax) { 
      if ($readini($scriptdir $+ admin.ini,ADMIN,$mta.nick($1,%aa)) >= 2) { 
        if (!%bb) %bb = $mta.nick($1,%aa) 
        elseif ($numtok(%bb,32) <= 7) %bb = %bb  $mta.nick($1,%aa) 
        elseif (!%cc) %cc = $mta.nick($1,%aa) 
        elseif ($numtok(%cc,32) <= 7) %cc = %cc  $mta.nick($1,%aa) 
        elseif (!%dd) %dd = $mta.nick($1,%aa)  
        elseif ($numtok(%dd,32) <= 7) %dd = %dd  $mta.nick($1,%aa) 
      } 
      !inc %aa 
    } 
    if (%bb) { 
      mta.text $1 Online Admin(s): %bb 
      if (%cc) mta.text $1 %cc 
      if (%dd) mta.text $1 %dd 
    } 
    else mta.text $1 There are no online admins. 
  } 

this is part of the Gus script.. I want to show the online admins with that, and it works. but now the levels for the players behind it.. like Online admin(s) : Recon (Level: 10) and that for each admin

Thanks!!!

Link to post
  • MTA Team

 elseif ($3 == !admin) || ($3 == !admins) { 
    var %aa = 0,%bb,%cc,%dd 
    while (%aa <= $mta.server($1).cmax) { 
      var %l = $readini($scriptdir $+ admin.ini,ADMIN,$mta.nick($1,%aa)) 
      if (%l >= 2) { 
        if (!%bb) %bb = $mta.nick($1,%aa) $+ (Level: %l $+ ) 
        elseif ($numtok(%bb,32) <= 7) %bb = %bb $+ $chr(44) $mta.nick($1,%aa) $+ (Level: %l $+ ) 
        elseif (!%cc) %cc = $mta.nick($1,%aa) $+ (Level: %l $+ ) 
        elseif ($numtok(%cc,32) <= 7) %cc = %cc $+ $chr(44) $mta.nick($1,%aa) $+ (Level: %l $+ ) 
        elseif (!%dd) %dd = $mta.nick($1,%aa) $+ (Level: %l $+ ) 
        elseif ($numtok(%dd,32) <= 7) %dd = %dd $+ $chr(44) $mta.nick($1,%aa) $+ (Level: %l $+ ) 
      } 
      !inc %aa 
    } 
    if (%bb) { 
      mta.text $1 Online Admin(s): %bb 
      if (%cc) mta.text $1 %cc 
      if (%dd) mta.text $1 %dd 
    } 
    else mta.text $1 There are no online admins. 
  } 

Not a cool way to do admins check/output though but w/e

Link to post
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...