Untitled

By Lousy Macaw, 6 Years ago (2013-03-09 21:15:31), written in Lua, viewed 441 times.
URL https://paste.godclan.hu/view/fSm8gjyq Embed
Download Paste or View RawExpand paste to full width of browser
  1. addEventHandler("onClientResourceStart", resourceRoot, function()
  2.     setSkyGradient(0, 252, 0, 124, 252, 0)
  3.     setWaterColor(124, 252, 0, 260)
  4.     setCloudsEnabled(false)
  5.     engineImportTXD(engineLoadTXD("gta_tree_palm2.txd"), 621)
  6.     engineReplaceModel(engineLoadDFF('veg_palm02.dff', 0), 621)
  7.     engineImportTXD(engineLoadTXD("gta_tree_palm.txd"), 622)
  8.     engineReplaceModel(engineLoadDFF("veg_palm03.dff", 622), 622)
  9.     engineImportTXD(engineLoadTXD("ballypillar01.txd"), 3437)
  10.    
  11.     outputChatBox(" ")
  12.     outputChatBox("Press #7cfc00'M'#FFFFFF to toggle the music On/Off.", 255, 255, 255, true)
  13.     --outputChatBox("[#7cfc00MAP#FFFFFF]#7cfc00 #FFFFFF[#7cfc00DM#FFFFFF] #7cfc00Surge: Green Day", 255, 255, 255, true)
  14.     outputChatBox("[#7cfc00MUSIC#FFFFFF] #7cfc00Green Day: Boulevard Of Broken Dreams", 255, 255, 255, true)
  15.    
  16.     toggleSong()
  17. end)
  18. function makeRadioStayOff()
  19.     setRadioChannel(0)
  20.     cancelEvent()
  21. end
  22. function toggleSong()
  23.     if not song then
  24.         song = playSound("music.mp3", true)
  25.         songOff = true
  26.     end
  27.     if not songOff then
  28.         setSoundVolume(song, 0)
  29.         songOff = true
  30.         removeEventHandler("onClientPlayerRadioSwitch", root, makeRadioStayOff)
  31.     else
  32.         setSoundVolume(song, 1)
  33.         songOff = false
  34.         setRadioChannel(0)
  35.         addEventHandler("onClientPlayerRadioSwitch", root, makeRadioStayOff)
  36.     end
  37. end
  38.  
  39. addEventHandler("onClientPlayerVehicleEnter", root, function()setRadioChannel(0)end)
  40. addCommandHandler("music", toggleSong)
  41. bindKey("m", "down", "music")
  42.  

Reply to "Untitled"

Here you can reply to the paste above