Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local dir = "mods"
- function loadMod(f, m, txd)
- if not txd then
- txdFile = dir.."/"..f..".txd"
- else
- txdFile = dir.."/"..txd..".txd"
- end
- local dffFile = dir.."/"..f..".dff"
- local colFile = dir.."/"..f..".col"
- if fileExists(txdFile) then
- local txd = EngineTXD(txdFile)
- if txd then
- txd:import(m)
- end
- end
- if fileExists(dffFile) then
- local dff = EngineDFF(dffFile,m)
- if dff then
- dff:replace(m)
- end
- end
- if fileExists(colFile) then
- local col = EngineCOL(colFile)
- if col then
- col:replace(m)
- end
- end
- end
- addEventHandler("onClientResourceStart", resourceRoot, function()
- loadMod("ut", 5488)
- loadMod("int_clothe_ship", 18024)
- loadMod("road_lawn39", 5808)
- loadMod("manns03_LAwN", 5874)
- loadMod("grove1", 17598)
- loadMod("grove2", 17600)
- loadMod("grove3", 17599)
- loadMod("grove4", 17597)
- loadMod("lae2_ground07", 17601)
- loadMod("clifftestgrnd", 4898)
- loadMod("fact", 11088)
- loadMod("stepshop", 6053)
- loadMod("hid", 5191)
- loadMod("kb_table_chairs1", 1825)
- loadMod("fotelcol", 1753)
- loadMod("piknikasztal", 1281)
- loadMod("pier03c_law2", 6299)
- loadMod("cj_noodle_1", 1571)
- loadMod("imnrmpy1_las2", 5169)
- loadMod("Pier02_LAw2", 6449)
- loadMod("filmstud2", 5865)
- loadMod("filmstud4", 5863)
- loadMod("filmstud3", 5864)
- loadMod("filmstud1", 5705)
- loadMod("atjaro1", 4182)
- loadMod("atjaro2", 6127)
- loadMod("atjaro3", 6118)
- loadMod("atjaro4", 6309)
- loadMod("laeroad41", 5506)
- --loadMod("dwntwnbit3_las", 4888)
- loadMod("ajto", 17564)
- loadMod("roadsSFSE52", 11098)
- loadMod("road_lawn22", 5805)
- loadMod("melblok12_lawn", 5782)
- loadMod("trainstat01_lawn", 5773)
- end)
- removeWorldModel(6397, 10000, 0,0,0)
- --- interface
- local editMode = false
- addCommandHandler("editmode", function()
- editMode = not editMode
- if editMode then
- addEventHandler("onClientRender", root, renderHoverElement)
- else
- removeEventHandler("onClientRender", root, renderHoverElement)
- end
- end)
- function renderHoverElement()
- local x,y,z = getElementPosition(localPlayer)
- local hit,x,y,z,elementHit,nx,ny,nz,material,lighting,piece,buildingId = processLineOfSight(x,y,z,x,y,z-10,true,true,true,true,true,true,false,true,localPlayer,true)
- if hit then
- if buildingId then
- outputDebugString(buildingId.." -> "..engineGetModelNameFromID(buildingId))
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement