ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getVehicleRespawnPosition

Function

getVehicleRespawnPosition

ServerVehiclesIdentical to MTA:SA

Returns the coordinates of the place where the vehicle appears when it respawns.

Syntax

float, float, float getVehicleRespawnPosition(vehicle vehicle)

Arguments

vehiclevehicle
The vehicle.

Returns

Three numbers x, y, z, or false.

Example

addCommandHandler("gdzieparking", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if not vehicle then return end
    local x, y, z = getVehicleRespawnPosition(vehicle)
    outputChatBox(("Parking: %.1f, %.1f, %.1f"):format(x, y, z), player)
end)

See also