mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
add Shavit_IsClientUsingHide()
This commit is contained in:
parent
73d21ea9d1
commit
4ec8a620be
50
addons/sourcemod/scripting/include/shavit/misc.inc
Normal file
50
addons/sourcemod/scripting/include/shavit/misc.inc
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* shavit's Timer - misc.inc file
|
||||
* by: shavit
|
||||
*
|
||||
* This file is part of shavit's Timer.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined _shavit_misc_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _shavit_misc_included
|
||||
|
||||
/**
|
||||
* Checks if a player is hiding players
|
||||
*
|
||||
* @param client Client index.
|
||||
* @return Boolean value.
|
||||
*/
|
||||
native bool Shavit_IsClientUsingHide(int client);
|
||||
|
||||
public SharedPlugin __pl_shavit_misc =
|
||||
{
|
||||
name = "shavit-misc",
|
||||
file = "shavit-misc.smx",
|
||||
#if defined REQUIRE_PLUGIN
|
||||
required = 1
|
||||
#else
|
||||
required = 0
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined REQUIRE_PLUGIN
|
||||
public void __pl_shavit_misc_SetNTVOptional()
|
||||
{
|
||||
MarkNativeAsOptional("Shavit_IsClientUsingHide");
|
||||
}
|
||||
#endif
|
||||
@ -32,6 +32,7 @@
|
||||
#include <tf2_stocks>
|
||||
|
||||
#include <shavit/core>
|
||||
#include <shavit/misc>
|
||||
|
||||
#undef REQUIRE_PLUGIN
|
||||
#include <shavit/chat>
|
||||
@ -158,6 +159,8 @@ public Plugin myinfo =
|
||||
|
||||
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
|
||||
{
|
||||
CreateNative("Shavit_IsClientUsingHide", Native_IsClientUsingHide);
|
||||
|
||||
gB_Late = late;
|
||||
|
||||
return APLRes_Success;
|
||||
@ -2623,3 +2626,8 @@ public Action Command_Drop(int client, const char[] command, int argc)
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public int Native_IsClientUsingHide(Handle plugin, int numParams)
|
||||
{
|
||||
return gB_Hide[GetNativeCell(1)];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user