mirror of
https://github.com/JezuzLizard/t4sp_bot_warfare.git
synced 2025-04-19 21:22:54 +00:00
ishost builtin
This commit is contained in:
parent
9114d20f73
commit
a92a5798d6
@ -222,6 +222,19 @@ BotBuiltinNotifyOnPlayerCommand( cmd, notif )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
waw doesnt have
|
||||||
|
*/
|
||||||
|
BotBuiltinIsHost()
|
||||||
|
{
|
||||||
|
if ( isDefined( level.bot_builtins ) && isDefined( level.bot_builtins["ishost"] ) )
|
||||||
|
{
|
||||||
|
return self [[ level.bot_builtins["ishost" ]]]();
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Returns if player is the host
|
Returns if player is the host
|
||||||
*/
|
*/
|
||||||
@ -268,7 +281,7 @@ doHostCheck()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !result )
|
if ( !self BotBuiltinIsHost() && !result )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
self.pers["bot_host"] = true;
|
self.pers["bot_host"] = true;
|
||||||
|
@ -17,6 +17,7 @@ init()
|
|||||||
level.bot_builtins["addtestclient"] = ::do_addtestclient;
|
level.bot_builtins["addtestclient"] = ::do_addtestclient;
|
||||||
level.bot_builtins["notifyonplayercommand"] = ::do_notifyonplayercommand;
|
level.bot_builtins["notifyonplayercommand"] = ::do_notifyonplayercommand;
|
||||||
level.bot_builtins["cmdexec"] = ::do_cmdexec;
|
level.bot_builtins["cmdexec"] = ::do_cmdexec;
|
||||||
|
level.bot_builtins["ishost"] = ::do_ishost;
|
||||||
}
|
}
|
||||||
|
|
||||||
do_printconsole( s )
|
do_printconsole( s )
|
||||||
@ -103,3 +104,8 @@ do_cmdexec( a )
|
|||||||
{
|
{
|
||||||
cmdexec( a );
|
cmdexec( a );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_ishost()
|
||||||
|
{
|
||||||
|
self isHost();
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user