dragonofdark Posted June 19, 2011 Share Posted June 19, 2011 Hello, I would like to make some garages with interiors so I made teleporters. The problem is when I teleport with a vehicle, it breaks and it take fire. If I teleport with a bike, I fall of it and the bike breaks. The vehicles don't touch the ground after the teleporting. What could be the problem with that ? Link to comment
JR10 Posted June 19, 2011 Share Posted June 19, 2011 Maybe it's narrow there lol or the coordinates are wrong. Link to comment
DakiLLa Posted June 19, 2011 Share Posted June 19, 2011 Try to freeze your vehicle with setElementFrozen before you teleport it and then un-freeze when you teleported it. Link to comment
dragonofdark Posted June 19, 2011 Author Share Posted June 19, 2011 The freeze changes nothing. Here is the script : if ( not veh ) then setElementDimension( player, getElementDimension( other ) ) setElementInterior( player, getElementInterior( other ) ) setCameraInterior( player, getElementInterior( other ) ) setElementPosition( player, getElementPosition( other ) ) setCameraTarget( player, player ) else setVehicleFrozen( veh, true ) setElementDimension( player, getElementDimension( other ) ) setElementInterior( player, getElementInterior( other ) ) setCameraInterior( player, getElementInterior( other ) ) setElementPosition( player, getElementPosition( other ) ) setCameraTarget( player, player ) local x,y,z = getElementPosition (other) setElementDimension( veh, getElementDimension( other ) ) setElementInterior( veh, getElementInterior( other ) ) setElementPosition( veh, x,y,z+0.3 ) setTimer( setVehicleFrozen, 500, 1, veh, false ) end Link to comment
Discord Moderators Zango Posted June 19, 2011 Discord Moderators Share Posted June 19, 2011 its due to the collisions in the area you warp to is not loaded. Set camera matrix to look at it for say two seconds, and then warp. Link to comment
dragonofdark Posted June 19, 2011 Author Share Posted June 19, 2011 Could you place the setCameraMatrix ? I don't really know where to put it Link to comment
Discord Moderators Zango Posted June 19, 2011 Discord Moderators Share Posted June 19, 2011 setCameraMatrix (x, y, z + 4, x, y, z) It'll look at your specified place, 4 units over it. Link to comment
dragonofdark Posted June 19, 2011 Author Share Posted June 19, 2011 Hm.. I put setCameraMatrix ( player, x, y, z + 4, x, y, z) before setVehicleFrozen( veh, true ) setElementDimension( player, getElementDimension( other ) ) And my vehicle is damaged anyway. Link to comment
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