note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
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
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: Gets the ID of the object the player is surfing on.
- GetPlayerSurfingVehicleID: Get the ID of the vehicle that the player is surfing (stuck to the roof of).