Jump to content

Function

Members
  • Posts

    38
  • Joined

  • Last visited

Details

  • Gang
    None
  • Location
    Vienna
  • Occupation
    Idk
  • Interests
    Fitness/Gym

Recent Profile Visitors

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

Function's Achievements

Rat

Rat (9/54)

4

Reputation

  1. addEventHandler("onClientClick",root, function(click,state) if click == "mouse1" and state == "up" then setWeaponState(weapon,"firing") else setWeaponState(weapon,"ready") end end )
  2. if not getPlayerTeam(player) then outputChatBox("You must be in a team to glue on a vehicle.",player,255,0,0) return end
  3. addEventHandler("onPlayerFinish",root, function(rank,time) if rank == 1 then playSound(...) elseif rank == 2 then playSound(...) end ) Do you mean like this?
  4. I don't know but i think... local r,g,b = math.random(255),math.random(255),math.random(255) for _,player in ipairs(getElementsByType("player")) do createBlipAttachedTo(player,0,2,r,g,b)
  5. Function

    Firehose

    Yes it is dxDrawMaterialLine3D
  6. function destroyTrailers(player,seat,jacked) if seat == 0 and getVehicleType(source) == "Train" then destroyElement(trailer) destroyElement(trailer2) destroyElement(trailer3) outputChatBox("Elhagytad a mozdonyt. A vagonok törlődtek!",player,255,255,255) end end addEventHandler("onVehicleExit",root,destroyTrailers)
  7. function VehicleSpeed(player) local vehicle = getPedOccupiedVehicle(player) if isPedInVehicle(player) then setElementVelocity(vehicle,x,y,z) end end end setTimer(VehicleSpeed,500,0)
  8. if source == (nem) then destroyElement(nem)
  9. Thank you very much bro! And whats about function stopsound() stopSound(sound) end addEvent("stopsound",true) addEventHandler("stopsound",root,stopsound) is there something wrong? Why do I not need the x, y, z coordinates on stop sound?
  10. Function

    help

    function healPlayer(player) setElementHealth(player,1000) setPedArmor(player,100) outputChatBox("You got full health and armor.",player) end end addCommandHandler("heal",root,healPlayer)
  11. [CLIENT] -------------------------------------------------------------------------------- url = "http://91.121.157.114:8421/stream" -------------------------------------------------------------------------------- function playsound() local x,y,z = getElementPosition(localPlayer) sound = playSound3D(url,x,y,z) setSoundMaxDistance(sound,50) end addEvent("playsound",true) addEventHandler("playsound",root,playsound) function stopsound() stopSound(sound) end addEvent("stopsound",true) addEventHandler("stopsound",root,stopsound) [SERVER] function createSpeaker(player) if isPedInVehicle(player) then outputChatBox("#ff0000[SPEAKER] #ffffffYou can't create a speaker while you are in a vehicle.",player,255,255,255,true) return end if isElementInWater(player) then outputChatBox("#ff0000[SPEAKER] #ffffffYou can't create a speaker while you are in the water.",player,255,255,255,true) return end local x,y,z = getElementPosition(player) if not isElement(speaker) then speaker = createObject(2229,x,y,z-1) triggerClientEvent("playsound",root,x,y,z) outputChatBox("#ff0000[SPEAKER] #ffffffYou have succesfully created a speaker.",player,255,255,255,true) else local sx,sy,sz = getElementPosition(speaker) outputChatBox("#ff0000[SPEAKER] #ffffffYou have already created a speaker at ("..string.format("%.2f",sx).." "..string.format("%.2f",sy).." "..string.format("%.2f",sz)..")",player,255,255,255,true) end end addCommandHandler("cspeaker",createSpeaker) function destroySpeaker(player) if isElement(speaker) then destroyElement(speaker) outputChatBox("#ff0000[SPEAKER] #ffffffYou have succesfully destroyed the speaker.",player,255,255,255,true) triggerClientEvent("stopsound",root) else outputChatBox("#ff0000[SPEAKER] #ffffffYou haven't created a speaker.",player,255,255,255,true) end end addCommandHandler("dspeaker",destroySpeaker) function destroySpeakerOnQuit() if isElement(speaker) then destroyElement(speaker) triggerClientEvent("stopsound",root) end end addEventHandler("onPlayerQuit",root,destroySpeakerOnQuit) Please guys can someone try this script with a friend and see if it works or is there something wrong?
  12. loadBrowserURL(source,"https://www.youtube.com")
×
×
  • Create New...