getVehicleRespawnRotation | Multi Theft Auto: Wiki Skip to content

getVehicleRespawnRotation

Client-side
Server-side
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

  • float float float: value

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

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