PlayerExitColshape
Jump to navigation
Jump to search
This event is triggered when a player exits a colshape.
Default dimension for ColShapes is 0, and the player must be in the same dimension as the Colshape for them to collide.
Contents
Server-Side Event
C# Syntax
See on GTA Network Wiki.
JavaScript Syntax
Parameters
- player: Player - The player which exited the colshape
- shape: ColShape - The colshape the player left
Example
let someColShape = mp.colshapes.newRectangle(0, 0, 100, 100);
function playerExitColshapeHandler(player, shape) {
if(shape == someColShape) {
console.log(`${player.name} left the colshape!`);
}
}
mp.events.add("playerExitColshape", playerExitColshapeHandler);
Client-Side Event
C# Syntax
public delegate void OnPlayerExitColshapeDelegate(Colshape colshape, CancelEventArgs cancel);Parameters
- colshape: colshape, expects RAGE.Elements.Colshape type.
- cancel: cancel, expects RAGE.Events.CancelEventArgs type.
Example
Events.OnPlayerExitColshape += OnPlayerExitColshape;public void OnPlayerExitColshape(RAGE.Elements.Colshape colshape, RAGE.Events.CancelEventArgs cancel)
{
RAGE.Chat.Output($"You exited colshape id:{colshape.Id}");
}
JavaScript Syntax
Parameters
- shape: ColShape
Example
let someColShape = mp.colshapes.newRectangle(0, 0, 100, 100);
function playerExitColshapeHandler(shape) {
if(shape == someColShape) {
//Local player left the colshape
}
}
mp.events.add("playerExitColshape", playerExitColshapeHandler);
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