Raised This Month: $ Target: $400
 0% 

Clcmd disappears when it is used in another plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pattinho
Member
Join Date: Dec 2007
Old 05-11-2012 , 19:26   Clcmd disappears when it is used in another plugin?
Reply With Quote #1

Hey,

i try to make a new plugin and i need to check if the client is using "drop". I test it and it doesnt works, because i know that another plugin is using this command too. So if i put the another plugin off then it checks but if both are on, the second disappears and i get no reaction. Is it a way to check it ? Because i need to use both plugins
Pattinho is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-11-2012 , 19:45   Re: Clcmd disappears when it is used in another plugin?
Reply With Quote #2

Just check it in 1 of the plugins... Or use natives
__________________

Last edited by Napoleon_be; 05-11-2012 at 19:46.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Pattinho
Member
Join Date: Dec 2007
Old 05-11-2012 , 20:01   Re: Clcmd disappears when it is used in another plugin?
Reply With Quote #3

The Problem is that i dont have the source Code of the second plugin. Because I create a anti cheat plugin but i have to know when someone is pressing g , but the main plugin is using this command too. What do you mean with natives?
Pattinho is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-11-2012 , 20:51   Re: Clcmd disappears when it is used in another plugin?
Reply With Quote #4

http://www.amxmodx.org/funcwiki.php?go=func&id=821

But since you don't have the source code of the second plugin, it will be a problem for you...
__________________

Last edited by Napoleon_be; 05-11-2012 at 20:51.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Old 05-12-2012, 01:29
doondook
This message has been deleted by xPaw. Reason: You're not contributing.
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-12-2012 , 08:57   Re: Clcmd disappears when it is used in another plugin?
Reply With Quote #6

Do the other plugin blocks the "drop" command? If yes - put your plugin above it in plugins.ini, then it should work.
__________________

Last edited by <VeCo>; 05-12-2012 at 09:01.
<VeCo> is offline
Pattinho
Member
Join Date: Dec 2007
Old 05-12-2012 , 09:08   Re: Clcmd disappears when it is used in another plugin?
Reply With Quote #7

ye but then it blocks in the another plugin. Well the first plugin is main plugin , if you press g ("drop") then you get a little bit turbo. With the new Plugin which i do, i try to check out when he got this turbo so i need both plugins, the problem is just i dont have the sourcecode of this plugin.
Pattinho is offline
Old 05-12-2012, 12:05
doondook
This message has been deleted by ConnorMcLeod. Reason: ...
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-12-2012 , 12:46   Re: Clcmd disappears when it is used in another plugin?
Reply With Quote #9

If you have the code source of the other plugin, open the drop cmd callback, and instead of return PLUGIN_HANDLED, put return PLUGIN_HANDLED_MAIN, it will block the command from being sent to the game, but other plugins will be able to catch it. Do the same in your plugin.
Or if you want that players can drop their weapons, put in both : return PLUGIN_CONTINUE.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 05-13-2012 , 13:41   Re: Clcmd disappears when it is used in another plugin?
Reply With Quote #10

Quote:
Originally Posted by ConnorMcLeod View Post
If you have the code source of the other plugin, open the drop cmd callback, and instead of return PLUGIN_HANDLED, put return PLUGIN_HANDLED_MAIN, it will block the command from being sent to the game, but other plugins will be able to catch it. Do the same in your plugin.
Or if you want that players can drop their weapons, put in both : return PLUGIN_CONTINUE.
My question is out of context of this thread, but relevant to another on the forum. (one i'm still trying to figure out) Will using PLUGIN_HANDLED_MAIN work in the case of showing an X when someone does damage to an opponent? Link to my code....
http://forums.alliedmods.net/showthread.php?t=184082
Liverwiz 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 00:27.


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