Code: Select all
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
what i need it to do is when the host leaves it selects the new host and gives it the "admin tower"
that action is here is here:
Custom script: call GetHost()
Unit - Change ownership of Admin tower 0002 <gen> to Host and Change color
.
thats all if you can help me i would appreciate it