Restrict function...
How the heck I can restrict some function? Let's say, mine function called "stickgun" is active. If it is active, the plugin restricts to use commands like "Duck" , "menu", etc... But if I call another function restriction will dissapear. So, how can I restrict functions if mine is active?
|
If you are using register_clcmd or register_concmd and returning PLUGIN_HANDLED, make sure your plugin is at the top of the list (or above any other plugins that may be catching the same command).
|
Ermm, I doubt mine plugin will be at top of the list... So is there any other way?
|
If you are sure no other plugins are intercepting that command then it can be anywhere. But if you are not sure just in a readme file or something warn them if they do not place it as the first plugin problems can arise.
Anyway I use the same method for blocking certain actions. I just supercede the command if I'm doing action a and don't want action b called. |
Erm, can some1 show me a code snippet?
|
This is how I block the powerup in esf if I don't want them using it. ( I'm using metamod but here is an amxx snippet ).
Code:
public plugin_init( ) { |
| All times are GMT -4. The time now is 09:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.