AlliedModders

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

KCE 04-17-2005 01:40

return PLUGIN_HANDLED_MAIN
 
Could someone explain what this does and when to use it? I've searched for it, but none of them explain return PLUGIN_HANDLED_MAIN

twistedeuphoria 04-17-2005 02:02

It works like this (say your function is client_PreThink):
PLUGIN_CONTINUE stops the current plugin's actions in PreThink but allows other plugins to use it
PLUGIN_HANDLED stops all plugins after current plugin (in plugins.ini) from using PreThink and (when it can) blocks the actual engine call.
[not sure]PLUGIN_HANDLED_MAIN stops the actual engine call (when it can) but lets other plugins use their code in PreThink as if the call was let through[/not sure].

Well, PreThink is not a good example because it can't actually be blocked, but something like client_infochanged should be able to be blocked.

XxAvalanchexX 04-17-2005 02:56

amxconst.inc!

Code:
#define PLUGIN_CONTINUE     0   /* Results returned by public functions */ #define PLUGIN_HANDLED      1   /* stop other plugins */ #define PLUGIN_HANDLED_MAIN 2   /* to use in client_command(), continue all plugins but stop the command */

So, yeah, basically what euphoria just said.


All times are GMT -4. The time now is 09:58.

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