function GetTrackableX takes trackable tc returns real return LoadReal(udg_VarHash,GetHandleId(tc),0) endfunction
function GetTrackableY takes trackable tc returns real return LoadReal(udg_VarHash,GetHandleId(tc),1) endfunction
function GetTrackableZ takes trackable tc returns real return LoadReal(udg_VarHash,GetHandleId(tc),2) endfunction
function GetTrackableFacing takes trackable tc returns real return LoadReal(udg_VarHash,GetHandleId(tc),3) endfunction
function GetTrackableModel takes trackable tc returns string return LoadStr(udg_VarHash,GetHandleId(tc),4) endfunction
function GetTrackableOwner takes trackable tc returns player return Player(LoadInteger(udg_VarHash,GetHandleId(tc),5)) endfunction
function CreateTrackableEx takes player owner, string path, real x, real y, real z, real face returns trackable local string tpath = path local trackable tc local destructable d = CreateDestructableZ('OTip',x,y,z,0.,1.,0) if GetLocalPlayer() != owner then set tpath = "" endif set tc = CreateTrackable(tpath,x,y,face) call RemoveDestructable(d)
function MultiboardSetItemValueForPlayer takes player whichPlayer, multiboard mb, integer row, integer column, string val returns nothing local multiboarditem mbi = MultiboardGetItem(mb,row,column) if GetLocalPlayer() == whichPlayer then call MultiboardSetItemValue(mbi,val) endif call MultiboardReleaseItem(mbi) set mbi = null endfunction
function MultiboardSetItemIconForPlayer takes player whichPlayer, multiboard mb, integer row, integer column, string icon returns nothing local multiboarditem mbi = MultiboardGetItem(mb,row,column) if GetLocalPlayer() == whichPlayer then call MultiboardSetItemIcon(mbi,icon) endif call MultiboardReleaseItem(mbi) set mbi = null endfunction
function MultiboardSetItemStyleForPlayer takes player whichPlayer, multiboard mb, integer row, integer column, boolean showValue, boolean showIcon returns nothing local multiboarditem mbi = MultiboardGetItem(mb,row,column) if GetLocalPlayer() == whichPlayer then call MultiboardSetItemStyle(mbi,showValue,showIcon) endif call MultiboardReleaseItem(mbi) set mbi = null endfunction
function MultiboardSetItemWidthForPlayer takes player whichPlayer, multiboard mb, integer row, integer column, real width returns nothing local multiboarditem mbi = MultiboardGetItem(mb,row,column) if GetLocalPlayer() == whichPlayer then call MultiboardSetItemWidth(mbi,width) endif call MultiboardReleaseItem(mbi) set mbi = null endfunction
function MultiboardDisplayForPlayer takes multiboard mb, player p returns nothing call MultiboardDisplay(mb,GetLocalPlayer()==p) endfunction
function CreateMultiboardForPlayer takes integer cols, integer rows, string title, player p returns multiboard local multiboard mb = CreateMultiboard() call MultiboardSetRowCount(mb,rows) call MultiboardSetColumnCount(mb,cols) call MultiboardSetTitleText(mb,title) call MultiboardDisplayForPlayer(mb,p) call SaveMultiboardHandle(udg_VarHash,0,100500,mb) set mb = null return LoadMultiboardHandle(udg_VarHash,0,100500) endfunction
Имея такую библиотечку, буквально каждый кодер сможет воссоздать хотя бы мультидоску из Доты.