PlayerLeaveVehicle: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 14: Line 14:


{{Example}}
{{Example}}
The example below does nothing on invoke of event
The example below send a chat message to the player when they exit a vehicle.


<syntaxhighlight lang="c#">
<syntaxhighlight lang="c#">

Revision as of 13:56, 29 November 2018

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