AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   making players\multipli menus? (https://forums.alliedmods.net/showthread.php?t=46951)

k007 11-05-2006 22:47

making players\multipli menus?
 
how do i make a players menu where it will show all the players in the server and then if u select one of them another menu will appear(multipli menus how do i do this one too)

stupok 11-05-2006 23:09

Re: making players\multipli menus?
 
You definitely need to read some documentation.

AMWiki

Xeroblood's tutorial

Or just look at some submitted plugins that have menus.

k007 11-05-2006 23:17

Re: making players\multipli menus?
 
i know how to make a fucking menu im not a noob u stupid...
i want to know how to make a menu that will display players that are in server for example like in uaio when u select a player or when u kick a player.. i have seen how people do it like in uaio or plmenu..etc but i just don't understand how does it work so i want to know how..

The Specialist 11-05-2006 23:49

Re: making players\multipli menus?
 
I know exactly what your talkiing about . I have the uaio menu on my server too . And the way i think you would do it , woud have to be
Code:
get_maxplayers = max get_player_name = name for( players < max) {         format(menu ,192, "names are %s",name) }
you know how to make the menu , all you need is a varaible to use for names , a for statement , and a menu format with a %s (string) to print the string . i think thats how you would do it (not exactly my code is syntex legit but your not a noob ):up: id try something like that

ModoZaur 11-06-2006 02:55

Re: making players\multipli menus?
 
Code:

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <amxconst>
#include <cstrike>
#include <fun>
#define PLUGIN "Super FUN plugin Menus"
#define VERSION "1.0"
#define AUTHOR "AlMod"
new g_menuPosition[33]
new g_menuPlayers[33][32]
new g_menuPlayersNum[33]
new g_menuOption[33]
new g_menuSettings[33]
new g_menuSelect[33][64]
new g_menuSelectNum[33]
#define MAX_CLCMDS 24
new g_coloredMenus
new g_cstrike = 0
public plugin_init()
{
 register_plugin(PLUGIN, VERSION, AUTHOR)
 
 register_dictionary("common.txt")
 
 //Console comands
 register_concmd("amx_godmenu", "cmdGodMenu", ADMIN_LEVEL_A, "- displays godmenu")
 register_menucmd(register_menuid("God Menu"), 1023, "actionGodMenu")
 
 g_coloredMenus = colored_menus()
 
}
/* Gods Menu */
public actionGodMenu(id, key)
{
 switch (key)
 {
  case 8: displayGodMenu(id, ++g_menuPosition[id])
  case 9: displayGodMenu(id, --g_menuPosition[id])
  default:
  {
  new player = g_menuPlayers[id][g_menuPosition[id] * 8 + key]
  new name[32]
 
  get_user_name(player,name,31)
 
  server_cmd("amx_god %s",name)
  server_exec()
  displayGodMenu(id, g_menuPosition[id])
  }
 }
 return PLUGIN_HANDLED
}
public displayGodMenu(id,pos)
{
 if (pos < 0)
  return // if position less 0 returns
 
 get_players(g_menuPlayers[id], g_menuPlayersNum[id]) // Get players
 new menuBody[512]
 new b = 0
 new i, igod
 new name[32], god[5]
 new start = pos * 8
 if (start >= g_menuPlayersNum[id])
  start = pos = g_menuPosition[id] = 0
 new len = format(menuBody, 511, g_coloredMenus ? "\yGod Menu\R%d/%d^n\w^n" : "God Menu %d/%d^n^n", id, pos + 1, (g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0)))
 
 new end = start + 8
 new keys = MENU_KEY_0//|MENU_KEY_8
 if (end > g_menuPlayersNum[id])
  end = g_menuPlayersNum[id]
 
 for (new a = start; a < end; ++a)
 {
  i = g_menuPlayers[id][a]
  get_user_name(i, name, 31)
 
  if(is_user_alive(i))
  {
  igod = get_user_godmode(i)
 
  if (igod == 1)
  {
    god="ON"
  }
  else if (igod == 0)
  {
    god="OFF"
  }
  }
  else
  {
  god="DEAD"
  }
 
  if (!is_user_alive(i))
  {
  ++b
 
  if (g_coloredMenus)
    len += format(menuBody[len], 511-len, "\d%d. %s\R%s^n\w", b, name, god)
  else
    len += format(menuBody[len], 511-len, "#. %s  %s^n", name, god)
  }
  else
  {
  keys |= (1<<b)
  len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s\y\R%s^n\w" : "%d. %s  %s^n", b+1, name, god)
  b++
  }
  /*if ((igod == (g_menuOption[id] ? 0 : 1)) || access(i, ADMIN_IMMUNITY))
  {
  / ++b
 
  if (g_coloredMenus)
    len += format(menuBody[len], 511-len, "\d%d. %s\R%s^n\w", b, name, god)
  else
    len += format(menuBody[len], 511-len, "#. %s  %s^n", name, god)
  } else {
  keys |= (1<<b)
  len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s\y\R%s^n\w" : "%d. %s  %s^n", ++b, name, god)
  }*/
 }
 //len += format(menuBody[len], 511-len, "^n8. %L^n", id, "TRANSF_TO", g_menuOption[id] ? "TERRORIST" : "CT")
 if (end != g_menuPlayersNum[id])
 {
  format(menuBody[len], 511-len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT")
  keys |= MENU_KEY_9
 }
 else
  format(menuBody[len], 511-len, "^n0. %L", id, pos ? "BACK" : "EXIT")
 show_menu(id, keys, menuBody, -1, "God Menu")
 
}
public cmdGodMenu(id, level, cid)
{
 if (!cmd_access(id, level, cid, 1))
  return PLUGIN_HANDLED
 g_menuOption[id] = 0
 displayGodMenu(id, g_menuPosition[id] = 0)
 return PLUGIN_HANDLED
}

here is my god menu for super plugin

I'll don't get the main idea of this, but catch some moments & remake it for myself

k007 11-06-2006 08:21

Re: making players\multipli menus?
 
you know what just forget it guys...

Zenith77 11-06-2006 19:21

Re: making players\multipli menus?
 
Search for AMXX menu template, or simply look in the base plugins.


All times are GMT -4. The time now is 06:53.

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