Jump to content

skaruharu

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

skaruharu's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. Hello! I created a vehicle and it works perfect when i enter it BUT i want the rainbow to stop when the vehicle respawn/destroys.. I have no idea how to make it. myBurrito = createVehicle(482, 2474.63794, -1654.04663, 13.33011, 0, 0, -270) function rainbowburrito (player) local myBurrito = getPlayerOccupiedVehicle(player) setTimer ( function () local r, g, b = math.random(255),math.random(255),math.random(255) setVehicleColor(myBurrito, r, g, b) end, 200, 0) end addEventHandler("onVehicleEnter", root, rainbowburrito)
  2. Oh i see.. Thanks alot for the help!
  3. Denny if i understood you right i made this.. But still not working client: [lua] function theradio () local x, y, z = getElementPosition(getLocalPlayer()) local int = getElementInterior(getLocalPlayer()) local dim = getElementDimension(getLocalPlayer()) local px, py, pz = getElementPosition(getLocalPlayer()) if (getDistanceBetweenPoints3D(x, y, z, px, py, pz)<50) then triggerServerEvent("onRadio", root, localPlayer) local hardstylee = playSound3D("http://listen.hardstyle.nu/listen.pls", x, y, z) setSoundMaxDistance(hardstylee, 40) setElementDimension(hardstylee, dim) setElementInterior(hardstylee, int) attachElements ( hardstylee, localPlayer) end end [/lua] server: function myradio (player) outputChatBox("Radio is now playing!", player, 255, 0, 0) end addEvent("onRadio", true) addEventHandler("onRadio", root, myradio)
  4. Thx Dimos but the code is not working.. If i do it with command in server side and trigger it then it works. But if i do it in client side with button then it doesnt work. It works when i use addEventHandler inside the gui but only me can hear.. So i have no idea how i can get it root because when i add the addEventHandler outside the gui i only get errors..
  5. Sorry but my friend can still not hear me play any music when i go close to him
  6. Hello! My problem is when i klick on the hardstyle button then i can hear the music but my friend cant hear it when im going close to him.. So any idea? Client: addEventHandler("onClientResourceStart", root, function () mywindow = guiCreateWindow(681, 407, 378, 372, "Radio", false) guiWindowSetSizable(mywindow, false) hardstyleB = guiCreateButton(16, 31, 103, 43, "Hardstyle", false, mywindow ) closeB = guiCreateButton(144, 330, 94, 32, "Close", false, mywindow ) addEventHandler("onClientGUIClick", closeB, closewindow, false) addEventHandler("onClientGUIClick", hardstyleB, theradio, false) guiSetVisible(mywindow,false) end) function theradio () local x, y, z = getElementPosition(getLocalPlayer()) local int = getElementInterior(getLocalPlayer()) local dim = getElementDimension(getLocalPlayer()) local px, py, pz = getElementPosition(getLocalPlayer()) if (getDistanceBetweenPoints3D(x, y, z, px, py, pz)<50) then local hardstylee = playSound3D("http://listen.hardstyle.nu/listen.pls", x, y, z) setSoundMaxDistance(hardstylee, 40) setElementDimension(hardstylee, dim) setElementInterior(hardstylee, int) attachElements ( hardstylee, localPlayer) end end
×
×
  • Create New...