PlayerLeaveVehicle: Difference between revisions

From RAGE Multiplayer Wiki
m (Fixed typo)
m (category)
Line 38: Line 38:
==See Also==
==See Also==
{{Player_events}}
{{Player_events}}
[[Category:Client-side Event]]

Revision as of 13:28, 15 May 2019

Triggers when the player exits the vehicle

Server-Side
Event

 C#  JavaScript



JavaScript Syntax

Example

To do


Client-Side Event

 C#  JavaScript


C# Syntax

public delegate void OnPlayerLeaveVehicleDelegate();

Parameters

  • This event has no parameters

Example

The example below send a chat message to the player when they exit a vehicle.

Events.OnPlayerLeaveVehicle += OnPlayerLeaveVehicle();
public void OnPlayerLeaveVehicle()
{
    RAGE.Chat.Output("You exited a vehicle");
}


JavaScript Syntax

Example

This example outputs chat message, when player start leave from the car.

mp.events.add("playerLeaveVehicle", () => {
    mp.gui.chat.push("Player start leave the vehicle");
})


See Also

Checkpoint

Colshape

Entity

Player

Streaming

Vehicle

Waypoint