Jump to content

FaydenFX.

Members
  • Posts

    10
  • Joined

  • Last visited

Details

  • Gang
    LUA
  • Location
    Poland
  • Occupation
    Warsaw
  • Interests
    MTA

Recent Profile Visitors

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

FaydenFX.'s Achievements

Member

Member (5/54)

1

Reputation

  1. FaydenFX.

    Firehose

    firehose = {} function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type(sEventName) == 'string' and isElement(pElementAttachedTo) and type(func) == 'function' then local aAttachedFunctions = getEventHandlers(sEventName, pElementAttachedTo) if type(aAttachedFunctions) == 'table' and #aAttachedFunctions > 0 then for i,v in ipairs(aAttachedFunctions) do if v == func then return true end end end end return false end addCommandHandler("firehose", function() local data = getElementData(localPlayer, "player:firehose") if not data then setElementData(localPlayer, "player:firehose", {["holder"] = "evidently"}) checkPlayerObject(localPlayer) else setElementData(localPlayer, "player:firehose", {["holder"] = "deficiency"}) end end) local function checkPlayerObject(player) if not player or not isElement(player) or getElementType(player) ~= "player" then return false end local data = getElementData(player, "player:firehose") if data["holder"] == "evidently" then local position = {getElementPosition(player)} table.insert(firehose, {x=position[1], y=position[2], z=position[3]}) if not isEventHandlerAdded("onClientRender", root, firehoseRender) then addEventHandler("onClientRender", root, firehoseRender) end else if isEventHandlerAdded("onClientRender", root, firehoseRender) then removeEventHandler("onClientRender", root, firehoseRender) end end end function firehoseRender() for i,v in pairs(firehose) do if (firehose[i + 1] ~= nil) then dxDrawLine3D(firehose[i].x, firehose[i].y, firehose[i].z+0.3, firehose[i + 1].x, firehose[i + 1].y, firehose[i + 1].z+0.3, tocolor(255, 255, 255, 255), 10) else dxDrawLine3D(firehose[i].x, firehose[i].y, firehose[i].z+0.3, firehose[i + 1].x, firehose[i + 1].y, firehose[i + 1].z+0.3, tocolor(255, 255, 255, 255), 10) end end end It does not work, any ideas?
  2. FaydenFX.

    Firehose

    Why does this line turn up? I think this is a function dxDrawMaterialLine3D. If I'm wrong, please give me an example of this feature :)
  3. FaydenFX.

    Firehose

    Video and no, it is not dxDrawLine3D
  4. FaydenFX.

    Firehose

    Hello, I have a question. What functions will be needed to make a fire hose? The photo I give below.
  5. function getInMarker(player, dimension) if getElementType(player) == "player" and dimension then if source == marker1 then local account = getPlayerAccount(player) if getAccountData(account, "green") then triggerClientEvent(source, "skin", player) else outputChatBox("You're not with the Special Military Unit!", player, 255, 0, 0) end end end end addEventHandler("onMarkerHit", resourceRoot, getInMarker)
  6. Is there any other way without a parachute?
  7. Exactly so, I want to stop the injury if the player jumps from height to the object. Can you do that?
  8. After all, everything is described here. I mean, if a player jumps from a building etc. The object does not get hurt. How to do something like that?
  9. Hello, I have a question like this: How to create a parachutes system available to the guard? Does it mean that a player is jumping on an object and not receiving damage?
×
×
  • Create New...