• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Host detection

Status
Not open for further replies.
Level 10
Joined
Feb 20, 2008
Messages
448
Host detection system

I need a host detection system to allow the host to choose the game mode
for the game make just make very very basic dialogue box, i got my own system that i will implant in

theres a code to begin the system

Code host
JASS:
function Trig_GetHost_Actions 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

//===========================================================================
function InitTrig_GetHost takes nothing returns nothing
    set gg_trg_GetHost = CreateTrigger(  )
    call TriggerAddAction( gg_trg_GetHost, function Trig_GetHost_Actions )
endfunction
 
Last edited:
Status
Not open for further replies.
Top