Deagle Posted June 12, 2011 Share Posted June 12, 2011 So, I have this teleport script, but after I enter in it with the car, it is teleporting me, but I hear a sound like the car has hitten somethig and my car loses all the "health" and starts to burn. My question is, what lines do I need to add so my vehicle is repaired after the teleport and how can I set the rotation of the car after the teleport. P.S. The gamemode is play. marker = createMarker(-657.49468994141, 950.86450195313, 12.451947212219, "corona", 3.5, 255, 255, 0, 255) function teleport(player) if getElementType(player)=="player" then local vehicle=getPedOccupiedVehicle(player) if source == marker then setElementPosition(vehicle, -3322.5373535156, 1776.5373535156, 14.093730926514) setVehicleFrozen(vehicle, true) setTimer(setVehicleFrozen, 1000, 1, vehicle, false) fixVehicle(vehicle) end end end addEventHandler("onClientMarkerHit", getRootElement(), teleport) Link to comment
Dark Dragon Posted June 12, 2011 Share Posted June 12, 2011 i think the fact you set the element position of a server side element client side could cause problems. try to swap this to a server side script and check if it makes it any better Link to comment
Deagle Posted June 13, 2011 Author Share Posted June 13, 2011 Ehm if I set it in a server-side script, it doesnt works at all. LE : Hmm , strange .... Now it works smoothly (client-side) , doesnt wants to explode .. Idk why was that happening , anyway a good scripter maybe can say. 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