In base plugin:
Code:
new 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 int Native_RankedMatch(Handle plugin, int numParams)
{
return RankedMatch;
}
My include:
Code:
#if defined _warmode_included
#endinput
#endif
#define _warmode_included
native int RankedMatch();
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
In other plugin added the inc file and created a debug command but have
error 076: syntax error in the expression, or invalid function call on both "rankedmatch" when compiling
Code:
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
{
RegPluginLibrary("warmode");
return APLRes_Success;
}
public Action DebugWar_Cmd(int client, int args)
{
if ( RankedMatch == true )
{
PrintToChat(client,"Enabled");
}
if ( RankedMatch == false )
{
PrintToChat(client,"Disabled");
}
}