mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-05-10 22:24:52 +00:00
host
This commit is contained in:
parent
bd6740bedf
commit
64ecb325b8
@ -20,9 +20,10 @@ init()
|
||||
cac_init_patch();
|
||||
thread hook_callbacks();
|
||||
|
||||
//menu?
|
||||
//waypoint editor?
|
||||
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") == "")
|
||||
setDvar("bots_manage_add", 0);//amount of bots to add to the game
|
||||
|
@ -10,6 +10,27 @@ is_host()
|
||||
doHostCheck()
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user