PlayerStartExitVehicle: Difference between revisions
| Line 1: | Line 1: | ||
==Parameters== | ==Parameters== | ||
* '''player''' - player, which left car | * '''player''' - player, which left car | ||
==Example== | |||
<div class="header" style="background-color: #E4F1FE; color: #4183D7; width: 100%; border: 2px solid #81CFE0;"> | |||
<div style="margin: 4px 0px 4px 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;"> | |||
function playerExitVehicle(player) { | |||
const playerName = player.name | |||
const srt = playerName + " left the car" | |||
mp.players.broadcast(str) | |||
} | |||
mp.events.add("playerExitVehicle", playerExitVehicle); | |||
</syntaxhighlight> | |||
</div> | |||
Revision as of 23:04, 3 May 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);