Skip to content

getVehicleRespawnRotation

Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function retrieves the respawn rotation of a vehicle.

OOP Syntax Help! I don't understand this!

  • Method:vehicle:getRespawnRotation(...)
  • Variable: .respawnRotation

Syntax

float float float getVehicleRespawnRotation ( ​vehicle theVehicle )
Required arguments
  • theVehicle: The vehicle which you'd like to retrieve the respawn rotation of.

Returns

Returns three floats indicating the respawn rotation of the vehicle , x , y and z respectively.

  • float float float: value

Code Examples

shared
function getRespawnPosition(player)
local veh = getPedOccupiedVehicle(player)
if veh then
local x,y,z = getVehicleRespawnPosition(veh)
local rx,ry,rz = getVehicleRespawnRotation(veh)
outputChatBox("this car respawn in x = "..x.." y = "..y.." z = "..z.." rx = "..rx.." ry = "..rz,player,0,255,0)
else
outputChatBox("you are not in the car",player,255,0,0)
end
end
addCommandHandler("getRespawnPos",getRespawnPosition)

See Also

Vehicle Functions