returns
can someone help me out by explaining to me how and when to use the two main returns return PLUGIN_HANDLED and return PLUGIN_CONTINUE.
"http://wiki.amxmodx.org/Intro_to_AMX_Mod_X_Scripting" this doesnt help too much I need a better explanation please a really dumafied one please if possible. |
Re: returns
Well my english aint that good to explain ,
but for example you regsiter a clcmd like "/start" if you say /start and in your public function at the end you use return PLUGIN_CONTINUE the plugin ignores evrything and evryone can see you typing /start , when using return PLUGIN_HANDLED the message will be blocked because the plugin stopped it . I hope you understand it a bit more cause my explantions arent evrything |
Re: returns
PLUGIN_HANDLED makes a function stop after doing something. Like:
PHP Code:
|
Re: returns
If you want to block the chat (no chat) use handled, like hleV said below, if not, use continue.
|
Re: returns
And if you want the chat message (not only chat messages but it's more understandable with this example) not to be printed but be detected by other plugins, use HANDLED_MAIN instead of HANDLED.
|
Re: returns
|
| All times are GMT -4. The time now is 03:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.