Re: New AMXX Menu System
You don't need to make button 8 for that option anyway, make it on button 7 or whatever...Buttons "Next / Back" and "Exit" are maded automaticly.
|
Re: New AMXX Menu System
What i want is a switch ban times button in a playermenu (all the players on the server in the menu) so each time i press that button it cycle throu the ban times
and when i want to ban a player and press that players name he shall get banned with the bantime value visible in the menu right then, i hope i make sence here :S |
Re: New AMXX Menu System
Yeah, but with new amxx menu system is a bit hard...because you can't make a button that stays permanently on bottom of page...like in old style menu, but you already have this on "amxmodmenu" ...default by amxmodx.
|
Re: New AMXX Menu System
I have been helping Lantz on amxbans alot and i was thinking of trying to use the new menus in amxbans.
I know a way to do it. Playermenu where you select a player and when you press the player a ban time menu appears and when you select a bantime a reson menu appears but i dont like that way to do it :( |
Re: New AMXX Menu System
I believe it would be possible to store the ban time in a global variable. When you press the menu button it should cycle through the ban time once and reshow the menu again. If you understand what I mean?
|
Re: New AMXX Menu System
Nice tutorial, helped me. I find this menu system a lot easier, and since I don't often use dynamic menus it's great for me. +Karma ;D
|
Re: New AMXX Menu System
Is there any chance of someone explaining / tutorialising the callback stuff?
IIRC you do something fancy with making a callback handle with a function name, and then passing that in, but the bit I don't really get is how to, say, remove options for a player. If I took the time and trouble I'm sure I could learn this jazz, but I'm fairly sure someone already has, and isn't that the point of Snippets/Tutorials? Generally I create / destroy a menu every time it is used, but at times it is useful to adjust a menu on the fly. |
Re: New AMXX Menu System
Hmm, lemme give you an eg:
Code:
new Menu = menu_create("\ySome Menu", "MenuHandler"); Code:
new iAccess, Name[32], iCallback; |
Re: New AMXX Menu System
And I would use menu_item_setname to screw with their text before showing onscreen?
Funky. And thankyou. |
Re: New AMXX Menu System
Quote:
|
Re: New AMXX Menu System
Hello All, Nub here :) I don't understand Any of the tutorials on Building menus. EX: the commands I dont know what they mean or do lol SOrry.
Anyhow Im working on a mod and I need some help with my menu system. http://forums.alliedmods.net/showthread.php?t=66808 < thats were I originally posted for help. But.... I dont understand how it was explained to me. I will Post the Code Here: and THere So yall can help me, If ya want. Would be greatfully appreciated!:) Im not even sure Im using the New Menu system . LOL . Im really new so Dont Bash Hard :shock: Actually Check out that forum Ill post on there tommorow. Sleepy |
Re: New AMXX Menu System
Hello :)
Just started with AMX Scripting. This was my first tutorial and it worked fine! :) Thanks for great tut :] |
Re: New AMXX Menu System
very nice Emp` :mrgreen:
|
Re: New AMXX Menu System
Where is the client cmd that they actually say to get the menu up ?
|
Re: New AMXX Menu System
Quote:
|
Re: New AMXX Menu System
Really nubbish question coming up...
How do i show the menu to all players on the server? Its probly really easy to do, but my brain isnt working today :( |
Re: New AMXX Menu System
Code:
new players[32], pnum; |
Re: New AMXX Menu System
You can put a Example to put more pages, Example, "Next Page..." Without do a menu2 :D
|
Re: New AMXX Menu System
u dont need a menu2
just put "cases" if u do 11 cases, page1 will show the first 7; back; and next then page2 will show 8, 9, 10, and 11 not too hard :) |
Re: New AMXX Menu System
Quote:
|
Re: New AMXX Menu System
See newmenus.inc
PHP Code:
PHP Code:
PHP Code:
|
Re: New AMXX Menu System
that sounds about right to me
|
Re: New AMXX Menu System
Okay so, I have TWO problems!
1) Basically what I'm trying to do is create a system where Player A would say killchance in chat and has a chance (lets say 1/10) for a menu to come up. Would someone please provide an example on how I could make the odds (1/10) happen? 2) The point of my plugin is to get a chance at basically slaying someone of your choice through the effects of chance. I would like to add a menu of all the players in the current server to this one command that you may or may not win. How could I link an actual PLAYER to the menu instead of an item? Basic Layout (What I'm Shooting For) : 1) Player B consistently kills player A. 2) Player A says killchance in chat and wins the 1/10 chance that he gets to slay him for a round! 3) Player A looks over the list and finds Player B so he hits his menu key (lets say 2) 4) Player B drops dead. 5) Player A has a good round =) +Karma and credit in my plugin to whoever can give the slightest bit of help, thanks! -Plugin will be called Random Kill Chance v1.0 if approved! |
Re: New AMXX Menu System
Quote:
PHP Code:
|
Re: New AMXX Menu System
Yes that is very helpful and I will definately use that but that's not what I'm ultimately having trouble with. What I'm trying to do is instead of ITEMS coming up on the menu I would like players' names to come up so that they can slay that selected player.
Thanks, emsu66 +Credit to you and Emp too! +Karma if you and/or anyone can help me figure this one out! |
Re: New AMXX Menu System
for the second param of menu_additem, use a string that has the players name (with get_user_name)
pass the players id within data (with num_to_str) then read the data (with str_to_num) so total example would be: Code:
function(id) |
Re: New AMXX Menu System
how i can remove the num of page?
|
Re: New AMXX Menu System
You have to use Old Style.
|
Re: New AMXX Menu System
O......very helpful....Thank you very much!
|
Re: New AMXX Menu System
I'm probably going to hit myself when you tell me what I did wrong but here.
I want the text of the item in the menu to not be defined there. I want it to be taken from outside. It kinda works right now but not really. This is what I have. Code:
new const BRANCH[] = { Code:
public ChangeBranch(id) If there is a better way the menu should be done tell me please. /changebranch opens ChangeBranch() The way it works now is when I type /changebranch in game it gives me Quote:
|
Re: New AMXX Menu System
try
Code:
new const BRANCH[][] = { |
Re: New AMXX Menu System
I swear I tried that at some point and it gave me a lot of errors down the line.
I must have miss typed it or something the first time cause this time it only gave me 2 errors yelling at me about one thing not having the 2nd [] in there so just threw those in there and tested it and everything works now. Thank you. |
Re: New AMXX Menu System
I'm having a problem, while writing and testing my code i found a small bug and don't know why it is occuring.
So this code makes it so that when you spawn a menu will show up with multiple pages. If someone were to ignore it and hit the "Select Team" key, which will remove the menu and open up the Team Selection Menu. But on the next round if you try to go to the next page it will bring up the Team Selection Menu. Instead of the "Select Team" key, the "Equipment Menu" was hit. On the next round you can go to the next page, but if you try to go back, it will send you to the previous page, but you would have bought a "Shield". So if anyone knows how to fix this problem, any help would be appreciated. I've tested it with the tutorial code as well and i get the same outcome. Code:
#include <amxmodx> |
Re: New AMXX Menu System
Quote:
So, does "item" here return one of the following?: Code:
Basically, I'm confused by the vars passed to the function assigned to the menu. |
Re: New AMXX Menu System
good job emp'
i gonna like this kind of menu :) |
Re: New AMXX Menu System
Code:
case 1:{ |
Re: New AMXX Menu System
Added an example player menu to main post.
|
Re: New AMXX Menu System
Thank you, i needed much :D
|
Re: New AMXX Menu System
I'm curious, if I have:
Code:
What if I called "NewMenu" and then, before I destory the menu, i call "OldMenu". Will the instance of that menu, ever be destroyed? I figure if i call "NewMenu" again, it will just make another menu. |
Re: New AMXX Menu System
I tried to pass a long string (long -> >6 charaters) and it didn't work. It seems I'm limited to data[6] :(. Is this correct?
I was trying to avoid using newplayername[33][32] to pass the new name through to the handler. |
All times are GMT -4. The time now is 02:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.