AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   AMX Super (https://forums.alliedmods.net/forumdisplay.php?f=111)
-   -   Admin check in amx super (https://forums.alliedmods.net/showthread.php?t=180488)

Roy333 03-16-2012 12:31

Admin check in amx super
 
Hey I want to edit amx_super so when i type /admins
people will see like
Owner online : asdasd
Moderator : asdasd
Super admins online : asdsad
admins online : asdasd

for example and it depends on the flags that the user have so if I got all flags im the owner for example how can I edit it ?
this is the code from the amx_super.sma
Code:

////////////////////////////////////////////////////////////////////////////////////////////////////////////
//ADMIN CHECK v1.15 by OneEyed
//==========================================================================================================
public show_admins(user)
{
 new message[256]
 if(get_pcvar_num(admincheck))
 {
  new adminnames[33][32]
  new contactinfo[256], contact[112]
  new id, count, x, len
 
  for(id = 1 ; id <= maxplayers ; id++)
  if(is_user_connected(id))
    if(get_user_flags(id) & ADMIN_CHECK)
    get_user_name(id, adminnames[count++], 31)
 
  len = format(message, 255, "%s ADMINS ONLINE: ",COLOR)
  if(count > 0) {
  for(x = 0 ; x < count ; x++) {
    len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
    if(len > 96 ) {
    print_message(user, message)
    len = format(message, 255, "%s ",COLOR)
    }
  }
  print_message(user, message)
  }
  else {
  len += format(message[len], 255-len, "No admins online.")
  print_message(user, message)
  }
 
  get_pcvar_string(sv_contact, contact, 63)
  if(contact[0])  {
  format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
  print_message(user, contactinfo)
  }
 }
 else
 {
  formatex(message, 255, "^x04 Admin Check is currently DISABLED.")
  print_message(user, message)
 }
}
print_message(id, msg[]) {
 message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
 write_byte(id)
 write_string(msg)
 message_end()
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////



All times are GMT -4. The time now is 19:28.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.