---
title: "GetPlayerSurfingOffsets | open.mp"
description: "Gets a player's surfing offsets."
canonical: https://omp.itsneufox.com/fil/docs/scripting/functions/GetPlayerSurfingOffsets
language: fil
---

# GetPlayerSurfingOffsets

warning

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

## Description

Gets a player's surfing offsets.

| Name | Description |
| --- | --- |
| playerid | The ID of the player. |
| &Float:offsetX | A float variable in which to store the offset X coordinate, passed by reference. |
| &Float:offsetY | A float variable in which to store the offset Y coordinate, passed by reference. |
| &Float:offsetZ | A float variable in which to store the offset Z coordinate, passed by reference. |

## Returns

This function does not return any specific value.

## Examples

```c
new surfingVehicleId = GetPlayerSurfingVehicleID(playerid);
if (surfingVehicleId != INVALID_VEHICLE_ID)
{
    new
        Float:offsetX,
        Float:offsetY,
        Float:offsetZ;

    GetPlayerSurfingOffsets(playerid, offsetX, offsetY, offsetZ);

    SendClientMessage(playerid, -1, "offsetX = %.2f offsetY = %.2f offsetZ = %.2f", offsetX, offsetY, offsetZ);
}
```

## Related Functions

-   [GetPlayerSurfingObjectID](https://omp.itsneufox.com/fil/docs/scripting/functions/GetPlayerSurfingObjectID): Gets the ID of the object the player is surfing on.
-   [GetPlayerSurfingVehicleID](https://omp.itsneufox.com/fil/docs/scripting/functions/GetPlayerSurfingVehicleID): Get the ID of the vehicle that the player is surfing (stuck to the roof of).
