Raised This Month: $ Target: $400
 0% 

New round events


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-10-2006 , 16:14   New round events
Reply With Quote #1

How can the mod see if it is a new round?
Found this. Not working, or my mod menu is wierd.
Code:
register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
If it is my menu that is wierd then tell me what is wrong here.
Code:
public ChooseClass(id) {     new menu[192]     format(menu, 191, "*: Choose Class^n^n1. *^n2. *^n3. *^n4. *^n^n5. *^n6. *^n^n0. Exit")     new key = KEY_1|KEY_2|KEY_3|KEY_4|KEY_5|KEY_6|KEY_0       show_menu(id, key, menu, -1, "ChooseClass")     }
Werewolf is offline
Jordan
Veteran Member
Join Date: Aug 2005
Old 03-10-2006 , 18:53  
Reply With Quote #2

I think it has to be MENU_KEY_1, but post your whole code to lemme see.
Jordan is offline
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-11-2006 , 05:53  
Reply With Quote #3

Yes I know but I defined the keys. Check this.
Code:
//Define keys
#define KEY_1      (1<<0)
#define KEY_2      (1<<1)
#define KEY_3      (1<<2)
#define KEY_4      (1<<3)
#define KEY_5      (1<<4)
#define KEY_6      (1<<5)
#define KEY_7      (1<<6)
#define KEY_8      (1<<7)
#define KEY_9      (1<<8)
#define KEY_0      (1<<9)
Should be no problems with that
Werewolf is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 03-11-2006 , 08:52  
Reply With Quote #4

Not enough information on the problem.
VEN is offline
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-11-2006 , 09:52  
Reply With Quote #5

I know what the problem is now. I made a test menu. It wont show up and I did in same way as in my mod
This was the menu I used in my test
Code:
public test(id) { new menu[192] format(menu, 191, "Select power^n^n1. Godmode!^n2. Noclip!^n^n0. Exit") new key = KEY_1|KEY_2|KEY_0 show_menu(id, key, menu) } public testkeys(id, key) {     switch(key)     {         case 0:         {         if(!is_user_admin(id)) {         client_print(id, print_chat, "You do not have access to that power.")         } else {         set_user_godmode(id, 1)         }         }         case 1:         {         if(!is_user_admin(id)) {         client_print(id, print_chat, "You do not have access to that power.")         } else {         set_user_noclip(id, 1)         }         }         case 9:         {         return PLUGIN_CONTINUE         }     }     return PLUGIN_CONTINUE }
And my keys is always defined as (1<<0) etc.
Werewolf is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 03-11-2006 , 10:31  
Reply With Quote #6

how do you call the menu?
its a lot easier if you would post the WHOLE script
[ --<-@ ] Black Rose is offline
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-11-2006 , 10:36  
Reply With Quote #7

Omg. If you want to see whole script then here you have it.
Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define KEY_1 (1<<0) #define KEY_2 (1<<1) #define KEY_3 (1<<2) #define KEY_4 (1<<3) #define KEY_5 (1<<4) #define KEY_6 (1<<5) #define KEY_7 (1<<6) #define KEY_8 (1<<7) #define KEY_9 (1<<8) #define KEY_0 (1<<9) public plugin_init() {     register_plugin("test", "1.00", "Werewolf")             register_clcmd("say menu", "test")     register_clcmd("say_team menu", "test")     register_clcmd("say /menu", "test")     register_clcmd("say_team /menu", "test")             register_menucmd(register_menuid("test"),1023,"testkeys") } public test(id) {     new menu[1024]     format(menu, 1023, "Select power^n^n1. Godmode!^n2. Noclip!^n^n0. Exit")     new key = KEY_1|KEY_2|KEY_0     show_menu(id, key, menu) } public testkeys(id, key) {     switch(key)     {         case 0:         {         if(!(get_user_flags(id)&ADMIN_IMMUNITY)) {         client_print(id, print_chat, "You do not have access to that power.")         return PLUGIN_HANDLED         } else {         set_user_godmode(id, 1)         }         }         case 1:         {         if(!(get_user_flags(id)&ADMIN_IMMUNITY)) {         client_print(id, print_chat, "You do not have access to that power.")         return PLUGIN_HANDLED         } else {         set_user_noclip(id, 1)         }         }         case 9: return PLUGIN_CONTINUE     }     return PLUGIN_CONTINUE }
There. I hope you can help me now.
*EDIT*
WORKS NOW!!!!
Werewolf is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 03-11-2006 , 11:51  
Reply With Quote #8

Quote:
Originally Posted by Werewolf
Omg. If you want to see whole script then here you have it.
<code snipped>
There. I hope you can help me now.
Nice attitude.
Brad is offline
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-11-2006 , 14:04  
Reply With Quote #9

Quote:
Originally Posted by Brad
Quote:
Originally Posted by Werewolf
Omg. If you want to see whole script then here you have it.
<code snipped>
There. I hope you can help me now.
Nice attitude.
Hehe. Well I added everything that was a part of this thread before so I got a bit annoyed . And you didn't have to post anything more to this thread because I already found the problem and fixed it. Without any help. Only scratched my head for a while and checked some include files. 1 more thing. Lock this thread please
No need to have it unlocked when the problem is solved
Werewolf 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 20:14.


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