From SA-MP Wiki
Get the ID of the vehicle that the player is surfing.
|playerid||The ID of the player you want to know the surfing vehicle ID of.|
|Returns||The 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.");
The following functions may be useful, as they are related to this function in one way or another.
- GetPlayerVehicleID: Get the ID of the vehicle the player is in.
- GetPlayerVehicleSeat: Check what seat a player is in.