Raised This Month: $ Target: $400
 0% 

A bug found??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Menion
Junior Member
Join Date: Mar 2005
Location: Gothenburg, Sweden
Old 03-21-2005 , 12:32   A bug found??
Reply With Quote #1

register_event("ShowMenu", "set_player_team", "b", "Team_Select") <--- Catches every ShowMenu-event - weird? Yeah, I know... It catches the BuyMenu and so on...

Anyone knows why?
Menion is offline
NiGHTFiRE
Senior Member
Join Date: Dec 2004
Location: Sweden
Old 03-21-2005 , 12:33  
Reply With Quote #2

try this:
Code:
register_event("ShowMenu", "set_player_team", "2", "Team_Select")
NiGHTFiRE is offline
Send a message via AIM to NiGHTFiRE Send a message via MSN to NiGHTFiRE
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 03-21-2005 , 12:33  
Reply With Quote #3

because those are menus :/ u are registering an event for every single player
Freecode is offline
Menion
Junior Member
Join Date: Mar 2005
Location: Gothenburg, Sweden
Old 03-21-2005 , 12:44  
Reply With Quote #4

Quote:
Originally Posted by NiGHTFiRE
try this:
Code:
register_event("ShowMenu", "set_player_team", "2", "Team_Select")
Now it doesn't catch the event at all...
Menion is offline
Menion
Junior Member
Join Date: Mar 2005
Location: Gothenburg, Sweden
Old 03-21-2005 , 12:45  
Reply With Quote #5

Quote:
Originally Posted by Freecode
because those are menus :/ u are registering an event for every single player
So what do you recommend?
Menion is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 03-21-2005 , 13:26  
Reply With Quote #6

are u sure its called Team_Select?
try printing all args for ShowMenu event when u r in team menu
Freecode is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-21-2005 , 14:04  
Reply With Quote #7

The fourth through infinitive parameters for register_event are conditions. "Team_Select" isn't a condition. Here are some examples of how to use it, from amxmodx.inc:

* Examples for conditions:
* "2=c4" - 2nd parameter of message must be sting "c4".
* "3>10" - 3rd parameter must be greater then 10.
* "3!4" - 3rd must be different from 4.
* "2&Buy" - 2nd parameter of message must contain "Buy" substring.
* "2!Buy" - 2nd parameter of message can't contain "Buy" substring. */
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 14:01.


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