AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Clcmd disappears when it is used in another plugin? (https://forums.alliedmods.net/showthread.php?t=185010)

Pattinho 05-11-2012 19:26

Clcmd disappears when it is used in another plugin?
 
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

Napoleon_be 05-11-2012 19:45

Re: Clcmd disappears when it is used in another plugin?
 
Just check it in 1 of the plugins... Or use natives

Pattinho 05-11-2012 20:01

Re: Clcmd disappears when it is used in another plugin?
 
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?

Napoleon_be 05-11-2012 20:51

Re: Clcmd disappears when it is used in another plugin?
 
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...

<VeCo> 05-12-2012 08:57

Re: Clcmd disappears when it is used in another plugin?
 
Do the other plugin blocks the "drop" command? If yes - put your plugin above it in plugins.ini, then it should work.

Pattinho 05-12-2012 09:08

Re: Clcmd disappears when it is used in another plugin?
 
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.

ConnorMcLeod 05-12-2012 12:46

Re: Clcmd disappears when it is used in another plugin?
 
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.

doondook 05-12-2012 14:11

Re: Clcmd disappears when it is used in another plugin?
 
ConnorMcLeod, I think he talks about soccerjam. It returns PLUGIN_HANDLED in "drop" function which increases speed (turbo). So the only way is to catch the event when maxspeed changes.

Pattinho 05-12-2012 18:31

Re: Clcmd disappears when it is used in another plugin?
 
Ah thanks ConnorMcLeod :) i will try it

Liverwiz 05-13-2012 13:41

Re: Clcmd disappears when it is used in another plugin?
 
Quote:

Originally Posted by ConnorMcLeod (Post 1707453)
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


All times are GMT -4. The time now is 00:27.

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