• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Way to detect which player is host?

Status
Not open for further replies.
Level 13
Joined
Feb 8, 2009
Messages
1,194
lol its simple just ask in the lobby who the hell is host or look at in it in the game description before you join the game
 
Level 4
Joined
Jul 9, 2008
Messages
88
JASS:
function GetHost takes nothing returns nothing
    local gamecache g = InitGameCache("Map.w3v")
    call StoreInteger ( g, "Map", "Host", GetPlayerId(GetLocalPlayer ())+1)
    call TriggerSyncStart ()
    call SyncStoredInteger ( g, "Map", "Host" )
    call TriggerSyncReady ()
    set udg_Host = Player( GetStoredInteger ( g, "Map", "Host" )-1)
    call FlushGameCache( g )
    set g = null
endfunction
--found on this website in less than 3 minutes.
 
Status
Not open for further replies.
Top