-
Posts
344 -
Joined
-
Last visited
-
Days Won
5
Hydra last won the day on September 24
Hydra had the most liked content!
About Hydra
- Birthday 13/06/2003
Details
-
Gang
-
-
Location
Romania
-
Occupation
Scripter
-
Interests
-
Recent Profile Visitors
4,145 profile views
Hydra's Achievements

Fool (23/54)
92
Reputation
-
There is nothing wrong in meta, you can put type for <file src> too
-
If you don't hear the sound, try to look for one for about 2-3 seconds maximum and in playSound("beep.mp3", false) put playSound("beep.mp3", true) so that the sound repeats. if this don't work idk then
-
Hydra started following event handlers not working after resource restart , [HELP] Parking Sensor , Project:V - RPG and 4 others
-
There are a lot of problems with your script Try this: local alarm = nil bindKey("s", "down", function() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then if isVehicleReversing(vehicle) then local nearObject = getNearestElement(vehicle, "object", 15) if nearObject then if alarm == nil then alarm = playSound("beep.mp3", false) end end end end end) function ForceSoundOff() local vehicle = getPedOccupiedVehicle(localPlayer) if not isVehicleReversing(vehicle) then if alarm ~= nil then stopSound(alarm) alarm = nil end end end addEventHandler("onClientRender", root, ForceSoundOff) function getNearestElement(player, type, distance) local result = false local dist = nil if player and isElement(player) then local elements = getElementsWithinRange(Vector3(getElementPosition(player)), distance, type, getElementInterior(player), getElementDimension(player)) for i = 1, #elements do local element = elements[i] if not dist then result = element dist = getDistanceBetweenPoints3D(Vector3(getElementPosition(player)), Vector3(getElementPosition(element))) else local newDist = getDistanceBetweenPoints3D(Vector3(getElementPosition(player)), Vector3(getElementPosition(element))) if newDist <= dist then result = element dist = newDist end end end end return result end function isVehicleReversing(theVehicle) local getMatrix = getElementMatrix (theVehicle) local getVelocity = Vector3 (getElementVelocity(theVehicle)) local getVectorDirection = (getVelocity.x * getMatrix[2][1]) + (getVelocity.y * getMatrix[2][2]) + (getVelocity.z * getMatrix[2][3]) if (getVectorDirection < 0) then return true end return false end
-
Project:V Project:V is a project that tries to be as similar as possible to GTA Online. This project is at beginning and has a long way to go before it is fully playable. But the updates to the server are made weekly, when there are major updates they will be announced on our discord server, but for the minor ones there is no point in announcing (Ex: I changed the text, etc...). So far, quite good progress has been made for a project that started not a while ago. Preview: https://streamable.com/a9wlk4 (OLD) https://streamable.com/sicxrf (OLD) https://streamable.com/86hj4f (NEW) https://streamable.com/b5eopj (NativeUI old -> replaced with a better one made by Allerek) Discord: https://discord.gg/XcPJeahDQE
-
function setCursorCenteredOnRectangle(x, y, width, height) if x and y and width and height then setCursorPosition(x + width/2, y + height/2) end end Cu aceasta functie puteti seta cursoru in centrul unui rectangle(merge si pentru text cel mai probabil) https://wiki.multitheftauto.com/wiki/SetCursorCenteredOnRectangle
-
1. Create a new .lua file 2. Open meta and type <script src="yourfile.lua" type="shared" /> It will look like this Shared File: my_var = "test" Server File: addCommandHandler("s", function(p, c) outputChatBox(my_var, root, 255, 255, 255, true) end) Client File: addCommandHandler("c", function() outputChatBox(my_var) end) I hope this is what you mean
-
you forgot to use addEvent for your function to work when you want to trigger it Client function onVehicleStuckInWater(vehicle) local delay = 4 -- in seconds timer.start(delay, function() destroyVehicle(vehicle) end) end addEvent("onVehicleStuckInWater", true) addEventHandler("onVehicleStuckInWater", root, onVehicleStuckInWater)
-
Weather & Time events --// Client addDebugHook("postFunction", function(_, _, _, _, _, weatherType) triggerEvent("onClientWeatherChange", resourceRoot, weatherType) end, {"setWeather"}) addDebugHook("postFunction", function(_, _, _, _, _, timeHour, timeMinute) triggerEvent("onClientTimeChange", resourceRoot, timeHour, timeMinute) end, {"setTime"}) --// Server addDebugHook("postFunction", function(_, _, _, _, _, weatherType) triggerEvent("onWeatherChange", resourceRoot, weatherType) end, {"setWeather"}) addDebugHook("postFunction", function(_, _, _, _, _, timeHour, timeMinute) triggerEvent("onTimeChange", resourceRoot, timeHour, timeMinute) end, {"setTime"}) EXAMPLES (CLIENT & SERVER): function TimeOnWeatherChange() outputChatBox("Weather changed (SERVER)", root, 255, 255, 0, true) end addEvent("onWeatherChange") addEventHandler("onWeatherChange", root, TimeOnWeatherChange) function TimeCheck() outputChatBox("Time changed (SERVER)", root, 255, 255, 0, true) end addEvent("onTimeChange") addEventHandler("onTimeChange", root, TimeCheck) function CTimeOnWeatherChange() outputChatBox("Weather changed (CLIENT)") end addEvent("onClientWeatherChange") addEventHandler("onClientWeatherChange", root, CTimeOnWeatherChange) function CTimeCheck() outputChatBox("Time changed (CLIENT)") end addEvent("onClientTimeChange") addEventHandler("onClientTimeChange", root, CTimeCheck) NOTE: Aceste eventuri merg doar daca folositi functiile (setTime & setWeather)
-
Daca am avea mai multe layere la setSkyGradient am putea face cerul cum e pe GTA V. Din pacate avem doar top & bottom rgb, oricum cred ca este posibil cu un obiect custom si shader pe el cu o textura.
-
interesanta idee
-
shader sau obiect custom?
-
Speed Effect & Nitro Effect Preview: https://streamable.com/89uc5l
-
Mai usor e fara _ la numele functiilor function FindValueInTable function FindValuePosInTable
-
local myMarker = createMarker(...) addEventHandler("onClientMarkerHit", myMarker, function(hit, dim) local vehicle = getPedOccupiedVehicle(localPlayer) if hit == localPlayer or hit == vehicle then if vehicle then setElementPosition(vehicle, x, y, z) setElementPosition(localPlayer, x, y, z) else setElementPosition(localPlayer, x, y, z) end end end)
-
Hydra changed their profile photo
-
Post a code, we can help you without it! I guess u need to put it like: addEventHandler("onPlayerSpawn", root, function() -- trigger your onPlayerFirstSpawn event end)