Jump to content

Search the Community

Showing results for tags 'setelementvelocity'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. Hello, I've been struggling with this last part of a script I'm making. Basically an object spawns, and needs to be launched forwards. However, this doesn't happen. the object just sits still. function rustlerCreateProjectile() local vehicle = getPedOccupiedVehicle(localPlayer) if(vehicle)then if getElementModel(vehicle) == 476 and rustler50calstate == 1 then outputChatBox ("50cal firing") elseif rustler20mmstate == 1 then outputChatBox ("20mm cannons firing") elseif rustler37mmstate == 1 then local x, y, z = getElementPosition(vehicle) local rx, ry, rz = getElementRotation(vehicle) local projectile37mm = createObject (2686, x, y, z, rx, ry, rz, true) local projectileattach = attachElements (projectile37mm, vehicle, 0, 4.3, -0.15) setTimer (function() detachElements (projectile37mm) end, 50, 1) setTimer ( function() setElementVelocity(projectile37mm, 0, 0, 50) --this is the part that I cannot get to work --destroyElement ( projectile37mm ) end, 50, 1 ) outputChatBox ("37mm cannon firing") end end end bindKey("mouse1", "down", rustlerCreateProjectile) What am I missing?
×
×
  • Create New...