OnPlayerEnterVehicle: Difference between revisions

From Onset Developer Wiki
mNo edit summary
m (Wrong tag.)
 
Line 20: Line 20:


{{RelatedFunctions}}
{{RelatedFunctions}}
{{VehicleServerEvents}}
{{VehicleEvents}}

Latest revision as of 08:10, 16 January 2020

OnPlayerEnterVehicle

Type: Event
Context: Server & Client
Introduced: v1.0

Description

This event is called when a player enters a vehicle.

Syntax

OnPlayerEnterVehicle(player, vehicle, seat)

Parameters

  • player
    The player is entering a vehicle.
  • vehicle
    The vehicle in which he is getting in.
  • seat
    The seat of the vehicle.

Example

AddEvent("OnPlayerEnterVehicle", function(playerid, vehicle, seat)
    if seat ~= 0 then
        AddPlayerChat(playerid, "You have entered the vehicle "..vehicle.." as a passenger.")
    end
end)

See also