Raised This Month: $ Target: $400
 0% 

Compile Error ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-09-2014 , 08:32   Re: Compile Error ?
Reply With Quote #1

You mistakes are obvious.....
PHP Code:
#include <amxmodx>
#include <hamsandwich>

enum _:gMenu
{
    
NAME[32],
    
ACTION[32]
};

new const 
gMenu_cmds[] [gMenu] = {
    { 
"Buy Menu""say /buy" }

};

public 
plugin_init(){
    
register_plugin("","1.0","");    
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)    
    
register_clcmd("say /menu","cmd_menu");
}


public 
cmd_menu(client){
    
    new 
menu_create("Your Menu :-","mHandler");

    for (new 
isizeof gMenu_cmdsi++)
    
menu_additem(m,gMenu_cmds[i][NAME]);
    
    
menu_display(client,m);
}

public 
mHandler(client,m,item)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(m)        
        return 
PLUGIN_HANDLED;
    }
    else
    {
        
client_cmd(client,"%s",gMenu_cmds[item][ACTION]);
        
cmd_menu(client);
    }
}

public 
fwHamPlayerSpawnPost(iPlayer) {
    if (
is_user_alive(iPlayer)) 
    {
        
engclient_cmd(iPlayer"say /menu")  
        
        return 
PLUGIN_HANDLED;
        
    }
    

HamletEagle 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 21:09.


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