Raised This Month: $32 Target: $400
 8% 

Items being purchased when a user selects menu option


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 11-10-2006 , 21:03   Items being purchased when a user selects menu option
Reply With Quote #1

Basically sometimes if the user is in a buyzone and opens one of my menus (from war3ft).. such as shopmenu, changerace...

The menu will execute correctly when they select an option, but sometimes it will also purchase an item and i have NO idea why, such as a smokegrenade....

Can anyone shed some light on why this is happening?

Thanks,
Josh
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 11-10-2006 , 21:19   Re: Items being purchased when a user selects menu option
Reply With Quote #2

What menus are you using, the new type or old school?
Also do you know if the buy menu was open prior to your menu?
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 11-10-2006 , 21:31   Re: Items being purchased when a user selects menu option
Reply With Quote #3

Buy menu not open...

And old-school menus... but I register them like this:

Code:
/*     Description: Function will register all menus for all languages */ public LANG_SetMenus() {     new iTotalLanguages = get_langsnum();     new lang[3], menu[128];     new curMenuId = -1, highestMenuId = -1;     new iLang, iMenu;     // Loop through every menu     for ( iMenu = 0; iMenu < TOTAL_MENUS; iMenu++ )     {         // Register the menu names for each language         for ( iLang = 0; iLang < iTotalLanguages; iLang++ )         {             get_lang ( iLang, lang );             if ( lang_exists( lang ) )             {                 formatex ( menu, 127, "%L", lang, MENU_NAMES[iMenu] );                 curMenuId = register_menuid ( menu );                 if ( curMenuId > highestMenuId )                 {                     register_menucmd ( curMenuId, 1023, MENU_CALLBACK[iMenu] );                     highestMenuId = curMenuId;                 }             }         }// End language loop     }// End menu loop }
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 11-10-2006 , 21:41   Re: Items being purchased when a user selects menu option
Reply With Quote #4

Put in a menu tracer, so it dumps out the menu id when an action happens. I read in another post you had a similar problem with the radio activating.

Having a guess it might be something like your menu title is similar/matches the buy equipment title, which causes a conflict I think. I'm pretty certain I had a odd problem like this ages ago and I had to change my menu title.

[edit]
Download SHP Tools in my sig:
hook_msg "ShowMenu"

It'll intercept any menus and dump the info into your server console/logfile.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd

Last edited by Orangutanz; 11-10-2006 at 21:56.
Orangutanz is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 11-10-2006 , 22:20   Re: Items being purchased when a user selects menu option
Reply With Quote #5

So how do I actually start this? I did hook_msg "ShowMenu" as well as logfile 1, and i see log files no where :/

Josh
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 11-10-2006 , 23:12   Re: Items being purchased when a user selects menu option
Reply With Quote #6

Those are actually CVARs, not client/server commands.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 11-10-2006 , 23:31   Re: Items being purchased when a user selects menu option
Reply With Quote #7

So how do I start it?
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 11-11-2006 , 06:35   Re: Items being purchased when a user selects menu option
Reply With Quote #8

Depending on your setup:

HLDS:
hook_msg "ShowMenu"
logfile 1

Ingame itself:
amx_rcon hook_msg "ShowMenu"
amx_rcon logfile 1

Also there is a problem with the precompiled amxx file be best to compile the script yourself until its fixed.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 11-11-2006 , 11:02   Re: Items being purchased when a user selects menu option
Reply With Quote #9

I did this on server console:

hook_msg "ShowMenu"
logfile 1

and nothing (and I compiled it myself)
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 11-12-2006 , 09:41   Re: Items being purchased when a user selects menu option
Reply With Quote #10

Did you open any menus after you setup your tracker?

type: listent in server console: if that fails then you couldn't of setup something correctly.


Note:
Something will only happen if ShowMenu is being sent, doesn't work on internal plugins yet! The purpose was to see if ShowMenu is being sent when you purchase something (ie buy, buyequip, radio1/2/3 menus etc) which is where your getting a conflict.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd

Last edited by Orangutanz; 11-12-2006 at 10:05.
Orangutanz is offline
Reply


Thread Tools
Display Modes

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 00:08.


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