mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 05:55:42 +00:00
host
This commit is contained in:
parent
d94c290a10
commit
0952e8af0a
@ -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") == "")
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user