AskPluginLoad2 Forward

Called before OnPluginStart, in case the plugin wants to check for load failure. This is called even if the plugin type is "private." Any natives from modules are not available at this point. Thus, this forward should only be used for explicit pre-emptive things, such as adding dynamic natives, setting certain types of load filters (such as not loading the plugin for certain games).

APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)


Handle myself

Handle to the plugin.

bool late

Whether or not the plugin was loaded "late" (after map load).

char[] error

Error message buffer in case load failed.

int err_max

Maximum number of characters for error message buffer.

Return Value

APLRes_Success for load success, APLRes_Failure or APLRes_SilentFailure otherwise


It is not safe to call externally resolved natives until OnPluginStart().

Any sort of RTE in this function will cause the plugin to fail loading.

If you do not return anything, it is treated like returning success.

If a plugin has an AskPluginLoad2(), AskPluginLoad() will not be called.