Raised This Month: $ Target: $400
 0% 

Question about return value.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-23-2014 , 06:25   Re: Question about return value.
Reply With Quote #1

return 1 is the same as return PLUGIN_HANDLED and it will stop the information from being send to server or to other plugins.
return 0 is the same as return PLUGIN_CONTINUE and it will let the information go everywhere it should.
return 2 is the same as return PLUGIN_HANDLED_MAIN stops the information from being send to server, but it will send it to other plugins.
return -1 is just a custom return. You can use return -345 but you doesn't make sense.
__________________
HamletEagle is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-23-2014 , 07:08   Re: Question about return value.
Reply With Quote #2

Quote:
Originally Posted by HamletEagle View Post
return 1 is the same as return PLUGIN_HANDLED and it will stop the information from being send to server or to other plugins.
return 0 is the same as return PLUGIN_CONTINUE and it will let the information go everywhere it should.
return 2 is the same as return PLUGIN_HANDLED_MAIN stops the information from being send to server, but it will send it to other plugins.
return -1 is just a custom return. You can use return -345 but you doesn't make sense.
Please do not explain stuff out of context. If it was a custom function or a Ham/Fakemeta forward, your explanation would be incorrect.

Quote:
Originally Posted by ghost95v View Post
Hello, what exactly return 1; / return -1; and return 0; does do? Thnx
They are just return values. Without the rest of the code, we can't tell you anything else
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 17:34.


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