Raised This Month: $ Target: $400
 0% 

unregister_clcmd


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-21-2007 , 11:23   Re: unregister_clcmd
Reply With Quote #1

both of em returns, meaning both will stop the function.
[ --<-@ ] Black Rose is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 01-21-2007 , 16:58   Re: unregister_clcmd
Reply With Quote #2

Quote:
Originally Posted by dutchmeat View Post
returning is the almost same result as returning plugin_continue
This comes from the fact that PLUGIN_CONTINUE is #defined to be a constant integer, 0. By chance, the pawn compiler sets the PRI register (which is used to transport return values) to 0 when you simply write return.

However, relying on this coincidence is not a good idea; always return SOMETHING if the forward handler is expected to return a value. If the return value is ignored, use the keyword return without a "parameter".
__________________
hello, i am pm
PM is offline
John6000
Junior Member
Join Date: Nov 2006
Old 01-21-2007 , 07:51   Re: unregister_clcmd
Reply With Quote #3

I got this working in the end =) thanks for your help people i have given you all karma
John6000 is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 01-21-2007 , 14:43   Re: unregister_clcmd
Reply With Quote #4

Let's clarify.

Returning PLUGIN_HANDLED does not stop the functionaility (nor does anything unless you return it at the very begining), everything will still be executed. However returning PLUGIN_HANDLED will tell AMXX to essentially stop calling forwards to other plugins that have hooked this command including the HL engine (hence if you return PLUGIN_HANDLED when you hook say, it won't display the chat message). Returning PLUGIN_CONTINUE on the other hand will do the opposite and all other forwards will be called, and if those aren't handled you will most likely get an "Unkown command" error since nothing handled it.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred

Last edited by Zenith77; 01-21-2007 at 14:46.
Zenith77 is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-22-2007 , 05:13   Re: unregister_clcmd
Reply With Quote #5

that's what i was trying to say(in a twisted way)
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat 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 22:20.


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