Tomc0 Posted October 22, 2012 Share Posted October 22, 2012 Hello! I have a little question. I made a script, the script teleports a ped into the player's vehicle, when the player hits the marker. But I have a problem with this. I want to teleport the ped near the player in the vehicle. Is it possible? The code: (because maybe I made a mistake) local ember = createPed ( 101, -1922.0999755859, 722.70001220703, 45.599998474121 ) -- ember = ped local ped_felvetel = createMarker ( -1921.9090576172, 724.75140380859, 44.81519317627, "corona", 1 ) -- the point where we need to pick up the ped (marker) function szallitas( thePlayer ) local auto = getPedOccupiedVehicle ( thePlayer ) if auto then warpPedIntoVehicle ( ember, auto ) else outputChatBox("Szerezz egy autót!") -- Szerezz egy autót means "Get a car!" (Hungarian languagE) end end addEventHandler( "onMarkerHit", ped_felvetel, szallitas ) Link to comment
Tete omar Posted October 22, 2012 Share Posted October 22, 2012 Did you try using "seat" in warpPedIntoVehicle function ? Link to comment
Tomc0 Posted October 22, 2012 Author Share Posted October 22, 2012 Man, I'm failed! Sorry for the stupid question! Thank you very much for the quick answer! Link to comment
Tete omar Posted October 22, 2012 Share Posted October 22, 2012 Man, I'm failed! Sorry for the stupid question! Thank you very much for the quick answer! No problem. 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