Commit 684aaed4 authored by Jordan Allard's avatar Jordan Allard

Add Tango_IsAdminHidden native

parent bb261156
Pipeline #173 canceled with stages
This diff was suppressed by a .gitattributes entry.
#if defined _tangocore_included
#endinput
#endif
#define _tangocore_included
public SharedPlugin __pl_tangocore =
{
name = "tango-core",
file = "tango-core.smx",
#if defined REQUIRE_PLUGIN
required = 1,
#else
required = 0,
#endif
};
/**
* Returns if an admin is hidden.
*
* @param iClient Client index of the player the menu is to be shown to.
*
* @return True if admin is hidden, false if otherwise.
*/
native bool Tango_IsAdminHidden(int iClient)
public void __pl_tangocore_SetNTVOptional()
{
MarkNativeAsOptional("Tango_IsAdminHidden");
}
\ No newline at end of file
#define SM_PREFIX " \x07[SM]\x01"
#define PLUGIN_AUTHOR "Urbana"
#define PLUGIN_VERSION "1.2.1"
#define PLUGIN_VERSION "1.3.1"
#include <sourcemod>
#include <sdktools>
......@@ -39,6 +39,14 @@ public Plugin myinfo =
url = "git.tangoworldwide.net/Urbana"
};
public APLRes AskPluginLoad2(Handle hMyself, bool bLate, char[] sError, int iErrMax)
{
RegPluginLibrary("tango-core");
CreateNative("Tango_IsAdminHidden", Native_IsHidden);
return APLRes_Success;
}
public void OnPluginStart()
{
// CUSTOM5 - ExtremeAdmin+ and ATeam+
......@@ -1250,3 +1258,10 @@ public Action Command_FriendlyFire(int client, int args)
g_cvFriendlyFire.SetBool(ff);
return Plugin_Handled;
}
public int Native_IsHidden(Handle hPlugin, int iNumParams)
{
if(iNumParams < 1)
return ThrowNativeError(SP_ERROR_NATIVE, "Tango_IsAdminHidden: Too few parameters specified (%d parameter%s", iNumParams, (iNumParams > 1 || !iNumParams) ? "s)." : ").");
return g_bAdminHidden[GetNativeCell(1)];
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment