well at line 10 you wrote elseif isPedInVehicle(player) then
what if the hitElement you defined as player was a vehicle your asking your script to check that is your vehicle inside your vehicle
would it not be more suitable to use elseif getElementType(player) == "vehicle" then
something like this
franMark1 = createMarker(1762.6, -1813.4, 12.6, "cylinder", 5, 255, 0, 0, 35)
franMark2 = createMarker(1805, -1748.6, 51.5, "cylinder", 5, 255, 0, 0, 115)
function teleport(player)
if (source == franMark1) then
if is_group(player) or is_admin(player) then
setElementPosition(player, 1791, -1780, 53)
setElementFrozen(player, true)
setTimer(setElementFrozen, 300, 1, player, false)
elseif getElementType(player) == 'vehicle' then
vehiclesit = getVehicleOccupant(player,0)
if vehiclesit then
setElementPosition(player, 1791, -1780, 53)
setElementFrozen(player, true)
setTimer(setElementFrozen, 300, 1, player, false)
end
end
elseif (source == franMark2) then
if is_group(player) or is_admin(player) then
setElementPosition(player, 1775.8, -1821.3, 14.5)
setElementFrozen(player, true)
setTimer(setElementFrozen, 300, 1, player, false)
end
end
end
addEventHandler("onMarkerHit", root, teleport)
(not tested)