ReXXuZ Posted January 14, 2018 Share Posted January 14, 2018 hello i want hydra to smoke out of its wings Link to comment
itHyperoX Posted January 14, 2018 Share Posted January 14, 2018 I think you can replace an object dff then attach the object to the hydra. I think there is no other way. Link to comment
ReXXuZ Posted January 14, 2018 Author Share Posted January 14, 2018 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 ? Link to comment
Tails Posted January 14, 2018 Share Posted January 14, 2018 You could attach a smoke effect https://wiki.multitheftauto.com/wiki/CreateEffect 4 minutes ago, ReXXuZ said: you make me this script ? Why not learn and do it yourself? This forum isn't for script requests, it's for help. We can only help you if you get stuck with your code. Link to comment
ReXXuZ Posted January 14, 2018 Author Share Posted January 14, 2018 1 hour ago, Tails said: You could attach a smoke effect https://wiki.multitheftauto.com/wiki/CreateEffect Why not learn and do it yourself? This forum isn't for script requests, it's for help. We can only help you if you get stuck with your code. do you please Link to comment
KaMi Posted January 14, 2018 Share Posted January 14, 2018 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 ) Link to comment
ReXXuZ Posted January 14, 2018 Author Share Posted January 14, 2018 (edited) 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 : 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 ) I want you out of the wings of the smoke Can you do it? please Edited January 14, 2018 by ReXXuZ Link to comment
KaMi Posted January 14, 2018 Share Posted January 14, 2018 6 minutes ago, ReXXuZ said: I want you out of the wings of the smoke Can you do it? please what do you mean ? Link to comment
ReXXuZ Posted January 14, 2018 Author Share Posted January 14, 2018 (edited) 1 hour ago, <~kamikaze~> said: ne demek istiyorsun ? I want out of the wings of the smoke Edited January 14, 2018 by ReXXuZ picture Link to comment
KaMi Posted January 14, 2018 Share Posted January 14, 2018 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 Link to comment
ReXXuZ Posted January 14, 2018 Author Share Posted January 14, 2018 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 Link to comment
KaMi Posted January 14, 2018 Share Posted January 14, 2018 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 ) Link to comment
ReXXuZ Posted January 14, 2018 Author Share Posted January 14, 2018 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 Link to comment
ReXXuZ Posted January 14, 2018 Author Share Posted January 14, 2018 1 hour ago, ReXXuZ said: the key opens but does not close again help me please Link to comment
ReXXuZ Posted January 15, 2018 Author Share Posted January 15, 2018 is there someone who wants to help? Link to comment
Storm-Hanma Posted January 15, 2018 Share Posted January 15, 2018 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 1 Link to comment
komal Posted November 18, 2019 Share Posted November 18, 2019 use smoke_flare sa-mp https://community.multitheftauto.com/index.php?p=resources&s=details&id=1292 1 Link to comment
Moderators IIYAMA Posted November 18, 2019 Moderators Share Posted November 18, 2019 (edited) Locked for misusing this section to produce scripts. This topic is also very old. @komal Edited November 18, 2019 by IIYAMA 1 Link to comment
Recommended Posts