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

Error copiler


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragos
Senior Member
Join Date: Oct 2018
Location: Romania
Old 01-30-2019 , 10:36   Error copiler
Reply With Quote #1

hi i need help to these idk what i do wrong =]

PHP Code:
// Generated with v3x's AMXX Menu Generator

#include <amxmodx>

public plugin_init()
{
    
register_plugin("My Menu""1.0""Me");
    
register_clcmd("say /menu""ShowMenu"_"Brings up menu");
}

public 
ShowMenu(id)
{
    new 
menu menu_create("Menu Weapons""Menu Weapons");

    
menu_additem(menu"AWP"""0); // case 0
    
menu_additem(menu"AK47"""0); // case 1
    
menu_additem(menu"DEAGLE"""0); // case 2
    
menu_additem(menu""""0); // case 3

    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_setprop(menuMPROP_BACKNAME"INAPOI");
    
menu_setprop(menuMPROP_NEXTNAME"INAINTE");
    
menu_setprop(menuMPROP_EXITNAME"AFARA");

    
menu_display(idmenu0);

    return 
PLUGIN_HANDLED;
}

public 
Menu Weapons(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_cancel(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"You have selected AWP");
        case 
1client_print(idprint_chat"You have selected AK47");
        case 
2client_print(idprint_chat"You have selected DEAGLE");
        case 
3client_print(idprint_chat"You have selected ");
    }

    
menu_destroy(menu);

    return 
PLUGIN_HANDLED;


Last edited by Dragos; 01-30-2019 at 10:37.
Dragos is offline
Vaggelis
Senior Member
Join Date: May 2017
Old 01-30-2019 , 11:25   Re: Error copiler
Reply With Quote #2

Here you are:
PHP Code:
// Generated with v3x's AMXX Menu Generator 

#include <amxmodx> 

public plugin_init() 

    
register_plugin("My Menu""1.0""Me"); 
    
register_clcmd("say /menu""ShowMenu"_"Brings up menu"); 


public 
ShowMenu(id

    new 
menu menu_create("Menu Weapons""MenuWeaponsHandler"); 

    
menu_additem(menu"AWP"""0); // case 0 
    
menu_additem(menu"AK47"""0); // case 1 
    
menu_additem(menu"DEAGLE"""0); // case 2 
    
menu_additem(menu""""0); // case 3 

    
menu_setprop(menuMPROP_EXITMEXIT_ALL); 
    
menu_setprop(menuMPROP_BACKNAME"INAPOI"); 
    
menu_setprop(menuMPROP_NEXTNAME"INAINTE"); 
    
menu_setprop(menuMPROP_EXITNAME"AFARA"); 

    
menu_display(idmenu0); 

    return 
PLUGIN_HANDLED


public 
MenuWeaponsHandler(idmenuitem

    if(
item == MENU_EXIT
    { 
        
menu_cancel(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"You have selected AWP"); 
        case 
1client_print(idprint_chat"You have selected AK47"); 
        case 
2client_print(idprint_chat"You have selected DEAGLE"); 
        case 
3client_print(idprint_chat"You have selected "); 
    } 

    
menu_destroy(menu); 

    return 
PLUGIN_HANDLED

Vaggelis is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 01-30-2019 , 11:29   Re: Error copiler
Reply With Quote #3

Quote:
Originally Posted by Dragos View Post
hi i need help to these idk what i do wrong =]

PHP Code:
// Generated with v3x's AMXX Menu Generator 
In that case, please consider helping yourself to get helped by posting in the right place.

I have moved your thread from SourceMod to AMX sections.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-30-2019 , 14:32   Re: Error copiler
Reply With Quote #4

If there is an error, why didn't you post it?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 01-30-2019 , 15:17   Re: Error copiler
Reply With Quote #5

you're headler isn't finished, if you chose 1 it wont give you AWP, only the print chat
you must do smth like
PHP Code:
case 0: {
    
give_item(id,"weapon_awp");
    
cs_set_user_bpammo(idCSW_AWP,30);
    
client_print(idprint_chat"You have selected AWP");  

then it will work, also you must strip weapons before, giving items
__________________
a simple act of caring creates an endless ripple.

Last edited by Nutu_; 01-30-2019 at 15:17.
Nutu_ 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 22:15.


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