SandroNL Posted June 21, 2010 Posted June 21, 2010 (edited) hi, i have scripted a elevator for race but if i go on it i go in the object how i can fix it ????? here movie on youtube : here the script : --lift function platformstart0 () setTimer ( platformstart1, 20000, 1 ) -- obj create obj = createObject ( 14548, 3618.4912109375, -1531.7802734375, 73.440940856934, 0.0, 0.0, 242.88586425781 ) end addEventHandler ( "onResourceStart", getRootElement(), platformstart0 ) --naar benede function platformstart1 () moveObject ( obj, 14548, 3618.4912109375, -1531.7802734375, 206.9638671875 ) setTimer ( platformstart2, 20000, 1) end --naar boven function platformstart2 () moveObject ( obj, 14548, 3618.4912109375, -1531.7802734375, 73.440940856934 ) setTimer ( platformstart1, 20000, 1) end -- vuur createFire (3226.576171875, -1374.0059814453, 4.2633757591248, 5) createFire (3226.4548339844, -1355.01538085, 4.7059955596924, 5) Edited June 21, 2010 by Guest
50p Posted June 21, 2010 Posted June 21, 2010 To me it looks like your elevator moves too fast. You can see the fire only when it's created close to you (streamed in).
SandroNL Posted June 21, 2010 Author Posted June 21, 2010 but other servers i see always fire on that place and what speed i need to put than ( how i do it ? ) change the timer ?
kevin11 Posted June 21, 2010 Posted June 21, 2010 moveObject ( obj, 14548, 3618.4912109375, -1531.7802734375, 206.9638671875 ) 14548 is the speed ( i think )
SandroNL Posted June 21, 2010 Author Posted June 21, 2010 (edited) moveObject ( obj, 14548, 3618.4912109375, -1531.7802734375, 206.9638671875 )14548 is the speed ( i think ) NO its ID * Edited June 21, 2010 by Guest
NotAvailable Posted June 21, 2010 Posted June 21, 2010 Just put a torch in those cars its easier ^^ & use another type of model as a elevator
dzek (varez) Posted June 21, 2010 Posted June 21, 2010 moveObject ( obj, 14548, 3618.4912109375, -1531.7802734375, 206.9638671875 )14548 is the speed ( i think ) NO its ID * It's speed (time)! You don't have ID here, cause you are not creating object here. obj is your object...
Maccer. Posted June 21, 2010 Posted June 21, 2010 Fire can only be created when the position is streamed. Here are two alternatives. Create fire on stream: addEventHandler ( "onClientElementStreamIn", getRootElement (), function ( ) if ( source == [i]streamed_in_object_goes_here[/i] ) then createFire (3226.576171875, -1374.0059814453, 4.2633757591248, 5) createFire (3226.4548339844, -1355.01538085, 4.7059955596924, 5) end end ) Create an invisible torch, with fire fx. Limited flame size though : _createFire = createFire -- MTA's createFire function transferred to _createFire function createFire ( x, y, z, rx, ry, rz ) local tempObj = createObject ( 3461, x, y, z - 2.5, rx, ry, rz ) setElementAlpha( tempObj, 0 ) setElementCollisionsEnabled ( tempObj, false ) return tempObj -- returns an object, so it's deletable by destroyElement end They're untested, but should work.
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