GetPlayerSurfingVehicleID

From SA-MP Wiki

Jump to: navigation, search

GetPlayerSurfingVehicleID


Warning: This function was added in SA-MP version 0.3. It is not available in previous versions.


Get the ID of the vehicle that the player is surfing.


Parameters:
(playerid)
playeridThe ID of the player you want to know the surfing vehicle ID.


ReturnsThe ID of the vehicle that the player is surfing, or INVALID_VEHICLE_ID if they are not surfing or the vehicle has no driver.


new surf = GetPlayerSurfingVehicleID(playerid);
if(surf == INVALID_VEHICLE_ID) SendClientMessage(playerid, COLOR_RED, "You are not surfing.");

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

Personal tools