Raised This Month: $ Target: $400
 0% 

Need help starting on my plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DemonicFuzzball
Junior Member
Join Date: Jun 2004
Old 04-03-2005 , 01:52   Need help starting on my plugin
Reply With Quote #1

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
DemonicFuzzball is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 04-03-2005 , 07:50  
Reply With Quote #2

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
__________________
- Bye bye!
nightscreem is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-03-2005 , 09:33  
Reply With Quote #3

Yuck, is that even a full menu?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
DemonicFuzzball
Junior Member
Join Date: Jun 2004
Old 04-03-2005 , 11:56  
Reply With Quote #4

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
DemonicFuzzball is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 04-03-2005 , 17:02  
Reply With Quote #5

Quote:
Originally Posted by v3x
Yuck, is that even a full menu?
i said that's one only for 2 if you want a full you have to add things
__________________
- Bye bye!
nightscreem is offline
DemonicFuzzball
Junior Member
Join Date: Jun 2004
Old 04-06-2005 , 22:59  
Reply With Quote #6

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
DemonicFuzzball is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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