Raised This Month: $ Target: $400
 0% 

Compile Error ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Awesome_man
Senior Member
Join Date: May 2014
Location: singapore
Old 07-09-2014 , 04:58   Compile Error ?
Reply With Quote #1

Please someone correct it, i tried many time to correct but still compile error :\

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 m = menu_create("Your Menu :-","mHandler");

    for (new i; i < sizeof gMenu_cmds; i++)
        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;
Awesome_man is offline
 



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