if isPedInVehicle ( theElement ) then
local theVehicle = getPedOccupiedVehicle ( theElement )
setElementPosition( theVehicle, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3])
else
setElementPosition( theElement, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3])
end
Dessa forma, se o jogador estiver em um veículo, teleporta o veículo e o jogador dentro. Se não estiver em um veículo, teleporta só o jogador.