DjSt3rios Posted June 24, 2011 Posted June 24, 2011 Hello guys, i have a problem, which i really can't understand. I made a map, and i added a drift meter, so i want when you reach 20000 points or something like that, teleport you to a position.(with your car of course as its race gamemode). so i have this: if(total >= 1) then local vehicle=getPlayerOccupiedVehicle(player) setVehicleFrozen(vehicle,true) setElementPosition (vehicle, -441.2646484375, -2218.306640625, 84.912033081055) setTimer(setVehicleFrozen,50,1,vehicle,false) end i just put 1 for now to test, well, it teleports my car there, but my car stays there on the air, it does not fall down... i can accelerate, and wheels are moving, but the car stays there on the air, like there is no gravity. Also i noticed if i make something like: setElementVelocity(vehicle, 0, 0, -1) i hear a weird sound from the engine, and some blur, and the minimap is beging smaller, so its like the car is falling down, but i see my car stopped.. weird thing, maybe anyone has any idea?
JR10 Posted June 24, 2011 Posted June 24, 2011 Any errors/warnings?? IDK Maybe try removing the player and warping him again when the position changes.
DjSt3rios Posted June 24, 2011 Author Posted June 24, 2011 Sounds good idea. Well its client side so no errors. Although i tried to make an event handler in Server Side, but it was the same without errors/warnings. I will post again when i try to warp the player again in the car..
JR10 Posted June 24, 2011 Posted June 24, 2011 Wait a minute getPlayerOccupiedVehicle It's not even a function how do you even get teleported should be getPedOccupiedVehicle And should be an error.
DjSt3rios Posted June 24, 2011 Author Posted June 24, 2011 Yes i noticed, I fixed that, but still i have no luck.. still cars remains there. ( I did it with triggerServerEvent )
JR10 Posted June 24, 2011 Posted June 24, 2011 Maybe make the timer to unfreeze the vehicle longer a bit.
will briggs Posted June 24, 2011 Posted June 24, 2011 Are you looking at the errors in /debugscript 3 or server...
JR10 Posted June 24, 2011 Posted June 24, 2011 Well its client side so no errors. Although i tried to make an event handler in Server Side, but it was the same without errors/warnings.
will briggs Posted June 24, 2011 Posted June 24, 2011 Twas just checking if he was looking at errors of the server window...
JR10 Posted June 24, 2011 Posted June 24, 2011 I remember someone had the same problem don't know if he fixed it.
will briggs Posted June 24, 2011 Posted June 24, 2011 Yeah, They never fixed it if im thinking of the post you are?
JR10 Posted June 24, 2011 Posted June 24, 2011 viewtopic.php?f=91&t=33845 Here it is, weird problem really.
DjSt3rios Posted June 24, 2011 Author Posted June 24, 2011 Probably its a bug, i dont have any other explanation.. the weird thing is that i have a server, and a guy gave me a map, and he had a teleport script, and i checked it, and it was working fine, and it was the same with mine.. (well just some like different names etc.).. i just dont get it.
Wojak Posted June 25, 2011 Posted June 25, 2011 my teleporteditor script also freeze the vehicle for 50ms, the only diference is that i'm using the anonymus function (i do a lot more then just unfreeze after the timer) and there are no problems... if(total >= 1) then local vehicle=getPedOccupiedVehicle(player) setVehicleFrozen(vehicle,true) setElementPosition (vehicle, -441.2646484375, -2218.306640625, 84.912033081055) setTimer(function() setVehicleFrozen(vehicle,false) end,50,1) end you may also try unfreezing the vehicle several times
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