create a new TRIGGER named 'host'
change it to own text / script
create a Variable named 'Host' / type - PLAYER
copy this script :
function Trig_host_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_host takes nothing returns nothing
set gg_trg_host = CreateTrigger( )
call TriggerAddAction( gg_trg_host, function Trig_host_Actions )
endfunction
script starts at mapinitialisation and the variable 'Host' is then hosting Player.
BEWARE: somtimes the HOST change during load, so that fastest PC get HOST function
(thx to dekar)
mfg
Trollkopp
_________________ everything is relativ <--- this too
|