Modme Forums
Menu:

get host

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: hahaDuNOOB
i need a script to get the host and use host as self like

while( self AdsButtonPressed() && self MeleeButtonPressed())
{
IPrintLnBold("ads test");
}


ModmeBot:

Reply By: Blink-420
Try using player 1 instead of host, because host is always player 1 (unless I'm mistaken in script player 1 = player 0)


ModmeBot:

Reply By: ZoekMeMaar

hahaDuNOOB
i need a script to get the host and use host as self like while( self AdsButtonPressed() && self MeleeButtonPressed()) { IPrintLnBold("ads test"); }


function do_bind_mods()
{  
   players = GetPlayers();
   foreach(player in players)
   {
      if(player IsHost(){
	   player thread give_player_binds();
      }  
   }
}

function give_player_binds()
{
   while( self AdsButtonPressed() && self MeleeButtonPressed())
   {
    IPrintLnBold("ads test");
   }
}
Thread function 'do_bind_mods' in your main with 'thread do_bind_mods();'