PlayerLeaveVehicle: Difference between revisions
m (category) |
No edit summary |
||
| Line 1: | Line 1: | ||
Triggers when the player exits the vehicle | Triggers when the player exits the vehicle. | ||
{{ClientsideCsJsEvent}} | {{ClientsideCsJsEvent}} | ||
{{CSharpContainer| | {{CSharpContainer| | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="csharp"> | ||
public delegate void OnPlayerLeaveVehicleDelegate(); | public delegate void OnPlayerLeaveVehicleDelegate(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{Parameters}} | {{Parameters}} | ||
''This event has no parameters'' | |||
{{Example}} | {{Example}} | ||
The example below send a chat message to the player when they exit a vehicle. | The example below send a chat message to the player when they exit a vehicle. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="csharp"> | ||
Events.OnPlayerLeaveVehicle += OnPlayerLeaveVehicle(); | Events.OnPlayerLeaveVehicle += OnPlayerLeaveVehicle(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="csharp"> | ||
public void OnPlayerLeaveVehicle() | public void OnPlayerLeaveVehicle() | ||
{ | { | ||
| Line 36: | Line 33: | ||
</pre> | </pre> | ||
}} | }} | ||
==See Also== | ==See Also== | ||
{{Player_events}} | {{Player_events}} | ||
[[Category:Player]] | |||
[[Category:Vehicle]] | |||
[[Category:Client-side Event]] | [[Category:Client-side Event]] | ||
Revision as of 13:14, 24 May 2019
Triggers when the player exits the vehicle.
Client-Side Event
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
- playerChat
- playerCommand
- playerDamage
- playerDeath
- playerJoin
- playerQuit
- playerReady
- playerSpawn
- playerWeaponChange
Streaming
Vehicle
- playerStartEnterVehicle
- playerEnterVehicle
- playerStartExitVehicle
- playerExitVehicle
- trailerAttached
- vehicleDamage
- vehicleDeath
- vehicleHornToggle
- vehicleSirenToggle