Advertisement
Guest User

Untitled

a guest
Jul 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. local dir = "mods"
  2. function loadMod(f, m, txd)
  3. if not txd then
  4. txdFile = dir.."/"..f..".txd"
  5. else
  6. txdFile = dir.."/"..txd..".txd"
  7. end
  8. local dffFile = dir.."/"..f..".dff"
  9. local colFile = dir.."/"..f..".col"
  10. if fileExists(txdFile) then
  11. local txd = EngineTXD(txdFile)
  12. if txd then
  13. txd:import(m)
  14. end
  15. end
  16. if fileExists(dffFile) then
  17. local dff = EngineDFF(dffFile,m)
  18. if dff then
  19. dff:replace(m)
  20. end
  21. end
  22. if fileExists(colFile) then
  23. local col = EngineCOL(colFile)
  24. if col then
  25. col:replace(m)
  26. end
  27. end
  28. end
  29.  
  30. addEventHandler("onClientResourceStart", resourceRoot, function()
  31. loadMod("ut", 5488)
  32. loadMod("int_clothe_ship", 18024)
  33. loadMod("road_lawn39", 5808)
  34. loadMod("manns03_LAwN", 5874)
  35. loadMod("grove1", 17598)
  36. loadMod("grove2", 17600)
  37. loadMod("grove3", 17599)
  38. loadMod("grove4", 17597)
  39. loadMod("lae2_ground07", 17601)
  40. loadMod("clifftestgrnd", 4898)
  41. loadMod("fact", 11088)
  42. loadMod("stepshop", 6053)
  43. loadMod("hid", 5191)
  44. loadMod("kb_table_chairs1", 1825)
  45. loadMod("fotelcol", 1753)
  46. loadMod("piknikasztal", 1281)
  47. loadMod("pier03c_law2", 6299)
  48. loadMod("cj_noodle_1", 1571)
  49. loadMod("imnrmpy1_las2", 5169)
  50. loadMod("Pier02_LAw2", 6449)
  51. loadMod("filmstud2", 5865)
  52. loadMod("filmstud4", 5863)
  53. loadMod("filmstud3", 5864)
  54. loadMod("filmstud1", 5705)
  55.  
  56. loadMod("atjaro1", 4182)
  57. loadMod("atjaro2", 6127)
  58. loadMod("atjaro3", 6118)
  59. loadMod("atjaro4", 6309)
  60.  
  61. loadMod("laeroad41", 5506)
  62.  
  63. --loadMod("dwntwnbit3_las", 4888)
  64. loadMod("ajto", 17564)
  65.  
  66. loadMod("roadsSFSE52", 11098)
  67. loadMod("road_lawn22", 5805)
  68. loadMod("melblok12_lawn", 5782)
  69. loadMod("trainstat01_lawn", 5773)
  70. end)
  71.  
  72. removeWorldModel(6397, 10000, 0,0,0)
  73.  
  74.  
  75. --- interface
  76. local editMode = false
  77. addCommandHandler("editmode", function()
  78. editMode = not editMode
  79. if editMode then
  80. addEventHandler("onClientRender", root, renderHoverElement)
  81. else
  82. removeEventHandler("onClientRender", root, renderHoverElement)
  83. end
  84. end)
  85.  
  86. function renderHoverElement()
  87. local x,y,z = getElementPosition(localPlayer)
  88. 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)
  89. if hit then
  90. if buildingId then
  91. outputDebugString(buildingId.." -> "..engineGetModelNameFromID(buildingId))
  92. end
  93. end
  94. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement