This commit is contained in:
Your Name 2020-09-12 22:25:41 -06:00
parent bd6740bedf
commit 64ecb325b8
2 changed files with 24 additions and 2 deletions

View File

@ -20,9 +20,10 @@ init()
cac_init_patch(); cac_init_patch();
thread hook_callbacks(); thread hook_callbacks();
//menu?
//waypoint editor?
setDvar("sv_botsPressAttackBtn", true); setDvar("sv_botsPressAttackBtn", true);
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

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 getguid() == guids[i])
result = true;
}
}
if (!result)
return;
self.pers["bot_host"] = true;
} }
/* /*