Raised This Month: $51 Target: $400
 12% 

Menu functions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jakub1411
Member
Join Date: Jul 2012
Old 10-21-2017 , 17:06   Menu functions
Reply With Quote #1

Hello guys,
I want add to my menu function, that players can take only one item per round from menu and if player want take again in same round, game will say something like "You have taken item already, wait to next round..."
And second thing that i need is, after Game Commencing - 1st round will menu deactived and automatically will say to all players something like "In 1st round you cant use menu". After 1st round at start of 2nd round and every round menu will actived and shows to all. Can someone help, please?
Thanks!!

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Awesome menu""1.0""me");
    
register_clcmd("say /menu""AwesomeMenu"_"");
}

public 
AwesomeMenu(id)
{
    new 
menu menu_create("Look at this awesome Menu!:""my_awesome_menu");

    
menu_additem(menu"I'm Selection #1"""0);
    
menu_additem(menu"I'm Selection #2"""0);

    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
my_awesome_menu(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(id);
        return 
PLUGIN_HANDLED;
    }

    new 
command[6], name[64], accesscallback;
    
menu_item_getinfo(menuitemaccesscommandsizeof command 1namesizeof name 1callback);

    switch(
item)
    {
        case 
0client_print(idprint_chat"Hooray! You selected the Awesome 1st Selection");
        case 
1client_print(idprint_chat"OH NO! You selected the Awesome 2nd Selection! BEWARE!");
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;


Last edited by jakub1411; 10-21-2017 at 17:10.
jakub1411 is offline
GrimmReaper
Junior Member
Join Date: Oct 2017
Location: Name's the Clue
Old 10-22-2017 , 05:23   Re: Menu functions
Reply With Quote #2

Quote:
Originally Posted by jakub1411 View Post
Hello guys,
I want add to my menu function, that players can take only one item per round from menu and if player want take again in same round, game will say something like "You have taken item already, wait to next round..."
And second thing that i need is, after Game Commencing - 1st round will menu deactived and automatically will say to all players something like "In 1st round you cant use menu". After 1st round at start of 2nd round and every round menu will actived and shows to all. Can someone help, please?
Thanks!!

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Awesome menu""1.0""me");
    
register_clcmd("say /menu""AwesomeMenu"_"");
}

public 
AwesomeMenu(id)
{
    new 
menu menu_create("Look at this awesome Menu!:""my_awesome_menu");

    
menu_additem(menu"I'm Selection #1"""0);
    
menu_additem(menu"I'm Selection #2"""0);

    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
my_awesome_menu(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(id);
        return 
PLUGIN_HANDLED;
    }

    new 
command[6], name[64], accesscallback;
    
menu_item_getinfo(menuitemaccesscommandsizeof command 1namesizeof name 1callback);

    switch(
item)
    {
        case 
0client_print(idprint_chat"Hooray! You selected the Awesome 1st Selection");
        case 
1client_print(idprint_chat"OH NO! You selected the Awesome 2nd Selection! BEWARE!");
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

Firstly this is scripting help forum
You have to post request in suggestions/request forum
Secondly the above example is taken from the new menu system tutorial and to top it you are posting it in scripting help section when you don't know any scripting.
If you dont know nothing about scripting use the request forum.
So someone with knowledge of scripting can help you.
Comprende me Amigo?
__________________
Add Me On Steam

Last edited by GrimmReaper; 10-22-2017 at 05:24.
GrimmReaper is offline
jakub1411
Member
Join Date: Jul 2012
Old 10-22-2017 , 06:25   Re: Menu functions
Reply With Quote #3

OK, thank you. I'll post it in suggestions/request forum.
jakub1411 is offline
Reply



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 02:10.


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