My way:
Code:
PHP Code:
bool RankedMatch = false;
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
{
CreateNative("RankedMatch", Native_RankedMatch);
RegPluginLibrary("warmode");
return APLRes_Success;
}
public any Native_RankedMatch(Handle plugin, int numParams) // "any" instead "int"
{
return RankedMatch; //or try "view_as<bool>(RankedMatch);"
}
Include:
PHP Code:
#if defined _warmode_included
#endinput
#endif
#define _warmode_included
native bool RankedMatch(); // "bool" instead "int"
public SharedPlugin __pl_warmode =
{
name = "War mode",
file = "warmode.smx",
#if defined REQUIRE_PLUGIN
required = 1,
#else
required = 0,
#endif
};
#if !defined REQUIRE_PLUGIN
public void __pl_warmode_SetNTVOptional()
{
MarkNativeAsOptional("RankedMatch");
}
#endif