ReXXuZ

help hydra smoke script

Recommended Posts

I think you can replace an object dff then attach the object to the hydra. I think there is no other way.

Share this post


Link to post
1 hour ago, TheMOG said:

I think you can replace an object dff then attach the object to the hydra. I think there is no other way.

you make me this script ?

Share this post


Link to post

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 :

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)
setElementCollisionsEnabled (smoke, false)
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).
      end
   end
end 
addEventHandler ( "onVehicleEnter", getRootElement(), hydrasm )

 

Share this post


Link to post
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

Edited by ReXXuZ

Share this post


Link to post
6 minutes ago, ReXXuZ said:

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

what do you mean ?

Share this post


Link to post
1 hour ago, <~kamikaze~> said:

ne demek istiyorsun ?

I want  out of the wings of the smoke 

4209cb103049f9eaf532e9f65dfe8cc1.jpg

 

Edited by ReXXuZ
picture

Share this post


Link to post
11 minutes ago, ReXXuZ said:

I want  out of the wings of the smoke 

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 )

 

function hydrasm( player )
if isPedInVehicle (player) then
local veh = getPedOccupiedVehicle(player)
local id = getElementModel ( veh )
if id == 520 then
addEventHandler ( "onVehicleExit", root, destroy )
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,+2,0,0)
attachElements(smoke2, veh,-2,0,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

 

Share this post


Link to post
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

Share this post


Link to post
6 minutes ago, ReXXuZ said:

you finally get a bindkey

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 )

 

Share this post


Link to post
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

Share this post


Link to post
1 hour ago, ReXXuZ said:

the key opens but does not close again

help me please

Share this post


Link to post

Trust me this idea is not good at all smoke effects  always lag players ,don't try this smoke things players will get laggy whenever they use hydra 

  • Like 1

Share this post


Link to post

Locked for misusing this section to produce scripts.

 

This topic is also very old. @komal

Edited by IIYAMA
  • Sad 1

Share this post


Link to post
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.