Roads example

From Crys, 9 Years ago, written in Lua, viewed 556 times.
URL https://paste.godclan.hu/view/wPPmhkF8 Embed
Download Paste or View Raw
  1. local txd
  2.  
  3. function roadsOn()
  4.         txd = engineLoadTXD("files/model/roads.txd")
  5.         engineImportTXD(txd, 3458)
  6.         engineImportTXD(txd, 8557)
  7.         engineImportTXD(txd, 8558)
  8.         engineImportTXD(txd, 8838)
  9. end
  10.  
  11. function roadsOff()
  12.         destroyElement(txd)
  13.         txd = nil
  14. end
  15.  
  16. addEventHandler("onClientResourceStart", resourceRoot, roadsOn)
  17.  
  18. bindKey("F3", "down", function ()
  19.         if txd then
  20.                 roadsOff()
  21.         else
  22.                 roadsOn()
  23.         end
  24. end)

Reply to "Roads example"

Here you can reply to the paste above