mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 12:03:20 +00:00
Add lib
This commit is contained in:
parent
a720ad3c22
commit
71c838a848
1 changed files with 43 additions and 0 deletions
43
scripting/include/CreateSurvivorBot.inc
Normal file
43
scripting/include/CreateSurvivorBot.inc
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
#if defined _CreateSurvivorBot_included
|
||||||
|
#endinput
|
||||||
|
#endif
|
||||||
|
#define _CreateSurvivorBot_included
|
||||||
|
|
||||||
|
native int NextBotCreatePlayerBotSurvivorBot(const char[] _szName = NULL_STRING);
|
||||||
|
|
||||||
|
native bool CTerrorPlayerRoundRespawn(int _iClientIndex);
|
||||||
|
|
||||||
|
stock int CreateSurvivorBot()
|
||||||
|
{
|
||||||
|
int bot = NextBotCreatePlayerBotSurvivorBot(NULL_STRING);
|
||||||
|
if( IsValidEntity(bot) )
|
||||||
|
{
|
||||||
|
ChangeClientTeam(bot, 2);
|
||||||
|
|
||||||
|
if( !IsPlayerAlive(bot) )
|
||||||
|
{
|
||||||
|
CTerrorPlayerRoundRespawn(bot);
|
||||||
|
}
|
||||||
|
return bot;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SharedPlugin __pl_shope =
|
||||||
|
{
|
||||||
|
name = "CreateSurvivorBot",
|
||||||
|
file = "CreateSurvivorBot.smx",
|
||||||
|
#if defined REQUIRE_PLUGIN
|
||||||
|
required = 1
|
||||||
|
#else
|
||||||
|
required = 0
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#if !defined REQUIRE_PLUGIN
|
||||||
|
public void __pl_CreateSurvivorBot_SetNTVOptional()
|
||||||
|
{
|
||||||
|
MarkNativeAsOptional("NextBotCreatePlayerBotSurvivorBot");
|
||||||
|
MarkNativeAsOptional("CTerrorPlayerRoundRespawn");
|
||||||
|
}
|
||||||
|
#endif
|
Loading…
Add table
Add a link
Reference in a new issue