AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help starting on my plugin (https://forums.alliedmods.net/showthread.php?t=12021)

DemonicFuzzball 04-03-2005 01:52

Need help starting on my plugin
 
Hey everyone,

This is my second plugin that i've tried to make, and this time, i hae no idea where to start. What my goal is, is have a command like amx_punishmenu taht displays a menu with different ways of punishing a user, and some of them very creative, but:
1) I don't know how to make a menu
2) The documentation only shows menus for clients, but not for admins
3) I have no idea how to be able to scroll throught users

any help willl be greatly appreciated!

THanks a ton!
- Demonic

nightscreem 04-03-2005 07:50

try this
Code:
#include <amxmodx> public plugin_init() {     register_clcmd("amx_menu","CmdMenu",ADMIN_MENU, "- Displays The menu")     register_menucmd(register_menuid("Hook Menu"),1023,"actionMenu")     return PLUGIN_CONTINUE } /*-------------------------------------Main Menu------------------------------------------------*/ public actionMenu(id, key) {     switch(key) {         case 0: {             client_cmd(id,"amx_command")         }         case 1: {             client_cmd(id,"amx_command2")         }     }     return PLUGIN_HANDLED } public CmdMenu(id, level, cid) {     if (!cmd_access(id, level, cid, 1))           return PLUGIN_HANDLED           new menu[256]     format(menu, 255, "\yname of menu^n^n\w1. command name^n\w2. command name2^n\w0. Exit")     show_menu(id,((1<<0)|(1<<1)|(1<<2)), menu)           return PLUGIN_HANDLED }
this is only for 2 commands want more just add more case
and the format thing and show_menu (1<<3) and so on

v3x 04-03-2005 09:33

Yuck, is that even a full menu? :shock:

DemonicFuzzball 04-03-2005 11:56

ok, so now i know hwot o make a menu, but i still dont understand how to be able to scroll throught the users to pick who i am punishing...
Also, i wanted it to only stop upon entering 0, but urs stops after i hit ne key. To do that would i put only (1 << 0)?
Thanks
- Demon

nightscreem 04-03-2005 17:02

Quote:

Originally Posted by v3x
Yuck, is that even a full menu? :shock:

i said that's one only for 2 if you want a full you have to add things

DemonicFuzzball 04-06-2005 22:59

no one has answered my problem:
Quote:

ok, so now i know hwot o make a menu, but i still dont understand how to be able to scroll throught the users to pick who i am punishing...
Also, i wanted it to only stop upon entering 0, but urs stops after i hit ne key. To do that would i put only (1 << 0)?
Thanks
- Demon


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

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