GetPlayerSurfingVehicleID

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 20:29, 22 April 2014
MP2 (Talk | contribs)

← Previous diff
Revision as of 22:34, 15 March 2020
OstGot (Talk | contribs)

Next diff →
Line 17: Line 17:
{{RelatedFunctions}} {{RelatedFunctions}}
 +{{GetPlayerSurfingObjectID}}
{{GetPlayerVehicleID}} {{GetPlayerVehicleID}}
{{GetPlayerVehicleSeat}} {{GetPlayerVehicleSeat}}

Revision as of 22:34, 15 March 2020



GetPlayerSurfingVehicleID was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions!


Description:

Get the ID of the vehicle that the player is surfing (stuck to the roof of).


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


Return Values:

The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also.


Example Usage:

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

Related Functions

The following functions may be helpful as they relate to this function in one way or another.

  • GetPlayerSurfingVehicleID: Gets the ID of the object that the player is surfing on.
Personal tools
In other languages