DazzaJay Posted December 3, 2008 Posted December 3, 2008 Basically, here is the script i have function scriptCreatePlane () airplane = createVehicle ( 577, -943.5, 548.4, 30.0, 0.0, 0.0, 280.0, plane ) moveObject ( airplane, 10000, -1841.2, -345.2, 30.0 ) setTimer (destroyElement, 12000, 1, airPlane) end addCommandHandler ( "plane", scriptCreatePlane ) Im sure you can tell what im Trying to do. Create a Plane, then Move the Plane over 10 seconds, then Destroy the plane after 12. Problem is, the Plane spawns, then just falls. No errors are outputted, so i have no idea what its doing. any ideas? The Most Accurate Real Car Names List & Mod Ever. No Bullcrap. <-- Updated 20-January-2008! The Most Awesome MTA Clan and Servers Ever! No Bullcrap! <-- We Are Recruting New Members! [PS] Clan signups are open to the public! (Currently we are looking for Scripters) Click Here to join!
50p Posted December 3, 2008 Posted December 3, 2008 Vehicles are not objects. Try to make an object of vehicle. I've never tried that myself by worth a try. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
DazzaJay Posted December 3, 2008 Author Posted December 3, 2008 Ok, now a really dumb question, would the vehicleID of the AT400 (577) be the same as say, the modelID? Well, i tried that and it failed, Error bad Model ID. Ok, ive had SOME limited success. I got the plane to Spawn and Not fall by attaching it to an Object like this: function scriptCreatePlane () airPlane = createObject ( 2469, -943.5, 548.4, 30.0 ) airplane1 = createVehicle ( 577, -943.5, 548.4, 30.0, 0.0, 0.0, 180.0 ) setElementParent ( airplane1, airPlane ) setTimer ( attachElementToElement, 500, 1, airplane1, airPlane, 0, 0, -1 ) setTimer ( moveTimer, 600, 1 ) end function moveTimer () moveObject ( airplane, 10000, -1841.2, -345.2, 30.0 ) setTimer (destroyElement, 12000, 1, airplane) end addCommandHandler ( "plane", scriptCreatePlane ) But i get Bad Argument Line 10 (moveObject) just after it spawns. The Most Accurate Real Car Names List & Mod Ever. No Bullcrap. <-- Updated 20-January-2008! The Most Awesome MTA Clan and Servers Ever! No Bullcrap! <-- We Are Recruting New Members! [PS] Clan signups are open to the public! (Currently we are looking for Scripters) Click Here to join!
DefiniteIntegral Posted December 3, 2008 Posted December 3, 2008 You could just use a normal vehicle, and create your own moveObject type function for moving it. It is possible to use setElementPosition on a frozen vehicle I think.... So just freeze your vehicle to stop it falling and move it along a linear path.
DazzaJay Posted December 3, 2008 Author Posted December 3, 2008 i got it working, turns out im an idiot, and did sime as "airplane" and some others a "airPlane" God i hate case sensitivity... lol. ll good, works now, thanks for everyones help The Most Accurate Real Car Names List & Mod Ever. No Bullcrap. <-- Updated 20-January-2008! The Most Awesome MTA Clan and Servers Ever! No Bullcrap! <-- We Are Recruting New Members! [PS] Clan signups are open to the public! (Currently we are looking for Scripters) Click Here to join!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now