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 )