AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   return PLUGIN_HANDLED (https://forums.alliedmods.net/showthread.php?t=5345)

Votorx 08-29-2004 12:24

return PLUGIN_HANDLED
 
I've always wondered, what exactly is the difference between

return PLUGIN_HANDLED
return PLUGIN_CONTINUE
and
return PLUGIN_MAIN_HANDLED ...or whatever it is.

johnjg75 08-29-2004 12:57

Code:
return PLUGIN_HANDLED
halts the plugin from going any further and
Code:
return PLUGIN_COUNTIUE
tells it to keep going. I never heard of
Code:
return PLUGIN_MAIN_HANDLED
somebody else will need to clarify that.

Votorx 08-29-2004 16:44

My bad, it's actually return PLUGIN_HANDLED_MAIN (defined as 3)

Anyways can you give me an situation when you would want to use PLUGIN_CONTINUE and PLUGIN_HANDLED? Not an actual plugin just like a small example of when to use it, because I think that's my biggest problems with my plugins (unless it really doesn't matter)

Freecode 08-29-2004 16:49

PLUGIN_CONTINUE stops the current function but plugin keeps going. My explanation isnt exactly good but i tried making it as n00by as possible

Votorx 08-29-2004 17:06

-.- I know what it does I just want a situation when you would want to use it.

devicenull 08-29-2004 17:25

in a "say"
continue, other players will see it normally
handled, no one sees the message
handled_main... I have yet to see a plugin that uses this, I dont have a clue

Votorx 08-29-2004 17:28

Ahhh I C, could you block a event like this?

devicenull 08-29-2004 17:30

Some of them yes, others cant be blocked like this.. but like 90% can

Greenberet 08-29-2004 18:51

You cant block an event with this, to block an event us must use the function

set_msg_block(iMessage, iMessageFlags);

this function is in egnine module.

Freecode 08-29-2004 19:04

Quote:

Originally Posted by Greenberet
You cant block an event with this, to block an event us must use the function

set_msg_block(iMessage, iMessageFlags);

this function is in egnine module.

matter of fact yes u can :wink:


All times are GMT -4. The time now is 17:19.

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