PlayerStartExitVehicle: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
Line 2: Line 2:
* '''player''' - player, which left car
* '''player''' - player, which left car
==Example==
==Example==
<div class="header" style="background-color: #E4F1FE; color: #4183D7; width: 100%; border: 2px solid #81CFE0;">
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
<div style="margin: 4px 0px 4px 10px;"><b>Server-side</b></div>
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
</div>
<div class="content" style="background-color: #E4F1FE; color: #4183D7; width: 100%; border: 2px solid #81CFE0; display: flex; justify-content: center; align-items: center;">
<syntaxhighlight lang="javascript" style="width: 98%; background-color: #E4F1FE;">
<syntaxhighlight lang="javascript" style="width: 98%; background-color: #E4F1FE;">
function playerExitVehicle(player) {
function playerExitVehicle(player) {

Revision as of 19:53, 18 September 2017

Parameters

  • player - player, which left car

Example

Server-Side
function playerExitVehicle(player) {
   const playerName = player.name
   const srt = playerName + " left the car"
   mp.players.broadcast(str)
}

mp.events.add("playerExitVehicle", playerExitVehicle);

See also