Raised This Month: $32 Target: $400
 8% 

Is it possible to remove a registered cmd?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JerryJerryAdios
Member
Join Date: Jun 2015
Location: the universe
Old 06-09-2015 , 05:47   Is it possible to remove a registered cmd?
Reply With Quote #1

for example:

I wrote this plugin and ran it on the server:
PHP Code:
#include <amxmodx>
#include <Ascend>

public plugin_init()
{
register_clcmd("hello""test")
}

public 
test(id)
{
setClientANIMATION(id25 0.5)

then i want to remove this command "hello" from the plugin via another plugin.

the problem is im not sure and also do not know if there is a way to do this.
give me a hand man~ appreciating...

Last edited by JerryJerryAdios; 06-09-2015 at 05:50.
JerryJerryAdios is offline
Send a message via Skype™ to JerryJerryAdios
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-09-2015 , 08:39   Re: Is it possible to remove a registered cmd?
Reply With Quote #2

You can create some public variables and alter them with xvars.
__________________
HamletEagle is offline
JerryJerryAdios
Member
Join Date: Jun 2015
Location: the universe
Old 06-09-2015 , 09:43   Re: Is it possible to remove a registered cmd?
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
You can create some public variables and alter them with xvars.
good idea man, but that plugin is not made by me, and that plugin doesnt register cvar instead of cmd. so if i want to remove the cmd of that plugin, i probably need to make another plugin to do this, but unfortunately i dont know the port to connect other plugins, i dont even know whether there is a port or not.
JerryJerryAdios is offline
Send a message via Skype™ to JerryJerryAdios
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 06-09-2015 , 09:43   Re: Is it possible to remove a registered cmd?
Reply With Quote #4

Quote:
Originally Posted by HamletEagle View Post
You can create some public variables and alter them with xvars.
or register the same cmd in another plugin and return PLUGIN_HANDLED if needed. this plugin should be placed before the original one in plugins.ini
jimaway is offline
JerryJerryAdios
Member
Join Date: Jun 2015
Location: the universe
Old 06-09-2015 , 12:55   Re: Is it possible to remove a registered cmd?
Reply With Quote #5

Quote:
Originally Posted by jimaway View Post
or register the same cmd in another plugin and return PLUGIN_HANDLED if needed. this plugin should be placed before the original one in plugins.ini
probably should return another value, though the value "PLUGIN_HANDLED" quite works, i still dont achieve my goal
But thanks a lot, im getting closer with your help

PS: that cmd is not based on AMXX, it's just a systemative cmd.
JerryJerryAdios is offline
Send a message via Skype™ to JerryJerryAdios
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 06-09-2015 , 13:19   Re: Is it possible to remove a registered cmd?
Reply With Quote #6

maybe you should explain what you are trying to do
jimaway is offline
JerryJerryAdios
Member
Join Date: Jun 2015
Location: the universe
Old 06-09-2015 , 22:08   Re: Is it possible to remove a registered cmd?
Reply With Quote #7

Quote:
Originally Posted by jimaway View Post
maybe you should explain what you are trying to do
um..it's a bit hard to explain, it's like this:


the cmd "change_class" is registered in hl.dll at first.



then a plugin named "Ascend.amxx" registered the same cmd as well, and it will change the original function when the player inputs the cmd



i can't delete "Ascend.amxx" because i need a lots other functions of it, thus, im looking for a way to make a plugin to call the original function back.

Last edited by JerryJerryAdios; 06-09-2015 at 22:13.
JerryJerryAdios is offline
Send a message via Skype™ to JerryJerryAdios
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-09-2015 , 22:39   Re: Is it possible to remove a registered cmd?
Reply With Quote #8

You should remove the problem function/command from the source code. If you don't have the source code, you shouldn't be using the plugin.
__________________
fysiks is offline
JerryJerryAdios
Member
Join Date: Jun 2015
Location: the universe
Old 06-09-2015 , 23:04   Re: Is it possible to remove a registered cmd?
Reply With Quote #9

Quote:
Originally Posted by fysiks View Post
You should remove the problem function/command from the source code. If you don't have the source code, you shouldn't be using the plugin.
thanks! i have just found an easier way:

i changed a word of the cmd in the hl.dll, and it works! lol


Last edited by JerryJerryAdios; 06-09-2015 at 23:05.
JerryJerryAdios is offline
Send a message via Skype™ to JerryJerryAdios
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 06-10-2015 , 02:53   Re: Is it possible to remove a registered cmd?
Reply With Quote #10

Modifying the game .dll can result in a VAC-ban of your account. Have fun! :top:
__________________

Mordekay 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 19:41.


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