
Function
Members-
Posts
38 -
Joined
-
Last visited
Everything posted by Function
-
addEventHandler("onClientClick",root, function(click,state) if click == "mouse1" and state == "up" then setWeaponState(weapon,"firing") else setWeaponState(weapon,"ready") end end )
-
Thats the same.
-
if not getPlayerTeam(player) then outputChatBox("You must be in a team to glue on a vehicle.",player,255,0,0) return end
-
addEventHandler("onPlayerFinish",root, function(rank,time) if rank == 1 then playSound(...) elseif rank == 2 then playSound(...) end ) Do you mean like this?
-
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)
-
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)
-
function VehicleSpeed(player) local vehicle = getPedOccupiedVehicle(player) if isPedInVehicle(player) then setElementVelocity(vehicle,x,y,z) end end end setTimer(VehicleSpeed,500,0)
-
if source == (nem) then destroyElement(nem)
-
Where is the AFK Zone?
-
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?
-
[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?
-
loadBrowserURL(source,"https://www.youtube.com")
-
function disableChat() local account = getPlayerAccount(source) if isGuestAccount(account) then cancelEvent() end end addEventHandler("onPlayerChat",root,disableChat)
-
[LF] Skilled scripter for advice [Contact inside]
Function replied to MegaFire's topic in Looking for staff
I can help you because I have a lot of scripts for a freeroam server -
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
-
function disablePunch() if getPedWeapon(source) == 0 then toggleControl(source,"fire",false) else toggleControl(source,"fire",true) end end Try this
-
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.
-
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
-
Also with the admin panel
-
Manually on the Admin Panel "Remove player from team" or when the player logout, because i am using a teamssaver too