Jump to content

ReXXuZ

Members
  • Content Count

    10
  • Joined

  • Last visited

Posts posted by ReXXuZ

  1. 1 hour ago, <~KaMiKaZe~> said:
    
    function hydrasm( player )
    if isPedInVehicle (player) then
    addEventHandler ( "onVehicleExit", root, destroy )
    local veh = getPedOccupiedVehicle(player)
    local id = getElementModel ( veh )
    if id == 520 then
    local x,y,z = getElementPosition(player)
    local smoke = createObject(2780, x, y, z)
    local smoke2 = createObject(2780, x, y, z)
    setElementCollisionsEnabled (smoke, false)
    setElementCollisionsEnabled (smoke2, false)
    attachElements(smoke, veh,5,-1,-1)
    attachElements(smoke2, veh,-5,-1,-1) 
    setElementAlpha(smoke, 0)
    setElementAlpha(smoke2, 0)
           end
        end
    end
    --addEventHandler ( "onVehicleEnter", getRootElement(), hydrasm )
    
    
    function destroy()
        local smokes = getAttachedElements(source)
        for i,v in ipairs (smokes) do
            detachElements (v, source)
    		destroyElement(v)
        end
    end
    
    function bind( player )
      bindKey ( player, "H", "down", hydrasm )   -- bind the player's F1 down key-- bind the player's fire down and up control
    end
    addEventHandler ( "onVehicleEnter", getRootElement(), bind )
    

     

    the key opens but does not close again

  2. 1 hour ago, <~KaMiKaZe~> said:
    
    function hydrasm( player )
    if isPedInVehicle (player) then
    local veh = getPedOccupiedVehicle(player)
    local id = getElementModel ( veh )
    if id == 520 then
    local x,y,z = getElementPosition(player)
    local smoke = createObject(2780, x, y, z)
    local smoke2 = createObject(2780, x, y, z)
    setElementCollisionsEnabled (smoke, false)
    setElementCollisionsEnabled (smoke2, false)
    attachElements(smoke, veh,5,-1,-1)
    attachElements(smoke2, veh,-5,-1,-1) 
    setElementAlpha(smoke, 0)
    setElementAlpha(smoke2, 0)
           end
        end
    end
    addEventHandler ( "onVehicleEnter", getRootElement(), hydrasm )
    

     

    you finally get a bindkey

  3. 1 hour ago, <~kamikaze~> said:

    you can attach the object "CJ_SMOKE_MACH" (ID 2780) to the hydra and that going to be a good effect. This is a example :

    1. function hydrasm( player )
    2. if isPedInVehicle (player) then
    3. local veh = getPedOccupiedVehicle(player)
    4. local id = getElementModel ( veh )
    5. if id == 520 then
    6. local x,y,z = getElementPosition(player)
    7. local smoke = createObject(2780, x, y, z)
    8. setElementCollisionsEnabled (smoke, false)
    9. attachElements(smoke, veh,0,0,0) --Here you can set the position of the effect (for default the effect going to be in the center of the hydra).
    10. end
    11. end
    12. end
    13. addEventHandler ( "onVehicleEnter", getRootElement(), hydrasm )

     

    I want you out of the wings of the smoke Can you do it? please

×
×
  • Create New...