PlayerStartExitVehicle: Difference between revisions
CocaColaBear (talk | contribs) No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
==Parameters== | ==Parameters== | ||
* '''player''' - player, which | * '''player''' - player, which goes out. | ||
==Example== | ==Example== | ||
This example outputs chat message, when player starts exit the car. | |||
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;"> | <div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;"> | ||
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div> | <div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div> | ||
<syntaxhighlight lang="javascript" style="width: 98%; background-color: #E4F1FE;"> | <syntaxhighlight lang="javascript" style="width: 98%; background-color: #E4F1FE;"> | ||
function | function playerStartExitVehicleHandler(player) { | ||
mp.players.broadcast(`${ | const playerName = player.name; | ||
const vehicleID = vehicle.id; | |||
mp.players.broadcast(`${playerName} started to exit the car with ID: ${vehicleID}`); | |||
} | } | ||
mp.events.add(" | mp.events.add("playerStartExitVehicle", playerStartExitVehicleHandler); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</div> | </div> | ||
Revision as of 21:46, 18 December 2017
Parameters
- player - player, which goes out.
Example
This example outputs chat message, when player starts exit the car.
Server-Side
function playerStartExitVehicleHandler(player) {
const playerName = player.name;
const vehicleID = vehicle.id;
mp.players.broadcast(`${playerName} started to exit the car with ID: ${vehicleID}`);
}
mp.events.add("playerStartExitVehicle", playerStartExitVehicleHandler);
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