Jump to content

Function

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by Function

  1. addEventHandler("onClientClick",root, function(click,state) if click == "mouse1" and state == "up" then setWeaponState(weapon,"firing") else setWeaponState(weapon,"ready") end end )
  2. Thats the same.
  3. if not getPlayerTeam(player) then outputChatBox("You must be in a team to glue on a vehicle.",player,255,0,0) return end
  4. addEventHandler("onPlayerFinish",root, function(rank,time) if rank == 1 then playSound(...) elseif rank == 2 then playSound(...) end ) Do you mean like this?
  5. 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)
  6. Function

    Firehose

    Yes it is dxDrawMaterialLine3D
  7. 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)
  8. function VehicleSpeed(player) local vehicle = getPedOccupiedVehicle(player) if isPedInVehicle(player) then setElementVelocity(vehicle,x,y,z) end end end setTimer(VehicleSpeed,500,0)
  9. if source == (nem) then destroyElement(nem)
  10. Where is the AFK Zone?
  11. 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?
  12. 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)
  13. [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?
  14. loadBrowserURL(source,"https://www.youtube.com")
  15. Function

    Chat

    function disableChat() local account = getPlayerAccount(source) if isGuestAccount(account) then cancelEvent() end end addEventHandler("onPlayerChat",root,disableChat)
  16. Function

    help

    I think with.. setElementInterior(hillArea,30) setElementDimension(hillArea,30)
  17. I can help you because I have a lot of scripts for a freeroam server
  18. What kind of script?
  19. Function

    Punch Hand

    function disablePunch() for _,player in ipairs(getElementsByType("player")) do if getPedWeapon(player) == 0 then toggleControl(player,"fire",false) else toggleControl(player,"fire",true) end end end setTimer(disablePunch,50,0) This is 100% working
  20. Function

    Punch Hand

    function disablePunch() if getPedWeapon(source) == 0 then toggleControl(source,"fire",false) else toggleControl(source,"fire",true) end end Try this
  21. 1. Create a new GUI. 2. Right click on the GUI and set the position code to center. 3. Again right click on the GUI and set it to Relative. 4. And then create your buttons, labels etc, but set only the GUI to relative and leave the rest on Absolute.
  22. I think it change the namecolor of all players because I used getElementsByType("player") - all players. If (team) then setPlayerNametagColor. Guys do I need to use getPlayersInTeam or not? Do I need to use getPlayersInTeam or no
  23. Also with the admin panel
  24. Manually on the Admin Panel "Remove player from team" or when the player logout, because i am using a teamssaver too
×
×
  • Create New...