This commit is contained in:
Your Name 2020-09-12 22:25:37 -06:00
parent d94c290a10
commit 0952e8af0a
2 changed files with 24 additions and 0 deletions

View File

@ -25,6 +25,9 @@ init()
setDvar("testclients_doAttack", true); setDvar("testclients_doAttack", true);
setDvar("testclients_doCrouch", false); setDvar("testclients_doCrouch", false);
if(getDvar("bots_main_GUIDs") == "")
setDvar("bots_main_GUIDs", "");//guids of players who will be given host powers, comma seperated
if(getDvar("bots_manage_add") == "") if(getDvar("bots_manage_add") == "")
setDvar("bots_manage_add", 0);//amount of bots to add to the game setDvar("bots_manage_add", 0);//amount of bots to add to the game
if(getDvar("bots_manage_fill") == "") if(getDvar("bots_manage_fill") == "")

View File

@ -10,6 +10,27 @@ is_host()
doHostCheck() doHostCheck()
{ {
self.pers["bot_host"] = false; self.pers["bot_host"] = false;
if (self is_bot())
return;
DvarGUID = getDvar("bots_main_GUIDs");
result = false;
if (DvarGUID != "")
{
guids = strtok(DvarGUID, ",");
for (i = 0; i < guids.size; i++)
{
if(self.guid == guids[i])
result = true;
}
}
if (!self isHost() && !result)
return;
self.pers["bot_host"] = true;
} }
/* /*