Raised This Month: $ Target: $400
 0% 

New Amxx Menu Help and checking!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Frozen Usp
Member
Join Date: Sep 2007
Location: Sweden
Old 05-16-2009 , 19:35   New Amxx Menu Help and checking!
Reply With Quote #1

Hi, iīm making a plugin where you can buy diffrent stuff from the menu.
i have been looking around and reading Empīs TUT on the new Amxx Menu but the thing i canīt seem to figure out is...
How do i make a forward so that if a Player press example. nr.1 the plugin starts a special public function? and how do i make it so that the plugin checks that he hasnīt already done it before.

This example is taken from http://forums.alliedmods.net/showthread.php?t=46364 and modded to help people understand my problem

PHP Code:
#include <amxmodx>

 
public plugin_init()
 {
    
register_clcmd"my_awesome_menu","AwesomeMenu");
 }
 public 
AwesomeMenu(id)
 {
    new 
menu menu_create("\rLook at this awesome Menu!:""menu_handler");
     
menu_additem(menu"\wI'm Selection #1""1"0);
    
menu_additem(menu"\wI'm Selection #2""2"0);
    
menu_additem(menu"\wI'm Secret Selection #3""3"ADMIN_ADMIN);
 }

// and so on...

switch(key)
    {
        case 
1:
        {
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }

public 
ex

 
bla bla user hp.... 
How do i make it so that if a player picks CASE 1, he will get the functions thats writen att public EX?

Last edited by Frozen Usp; 05-16-2009 at 19:37.
Frozen Usp is offline
Send a message via MSN to Frozen Usp
 



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 01:36.


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