OnPlayerExitColShape

From GTA Network Wiki
(Redirected from OnEntityExitColShape)
Jump to: navigation, search

OnPlayerExitColShape
Shared Function

utilities-terminal.png Server-Side system-users.png Client-Side csharp.png C#

This event is triggered when a player exits a colshape.



Server-side

Subscribing

Note: the Attribute should be declared above the method to be invoked, it's alternative to subscribing the method to a delegate, introduced for performance reasons.

[ServerEvent(Event.PlayerExitColshape)]

Method Syntax

void OnPlayerExitColShape(ColShape shape, Client player)

Required Parameters

  • ColShape: colshape which got exited.
  • Client: player who exited the colshape.

Usage example(s)

[ServerEvent(Event.PlayerExitColshape)]
public void OnPlayerExitColShape(ColShape shape, Client player)
{
    // Some code
}


Client-side

Subscribing

Note: the method should be subscribed to the respective event delegate in your Main constructor/Entry point for it to be invoked.

public Main() 
{
    Events.OnPlayerExitColshape += OnPlayerExitColshape;
}

Method Syntax

void OnPlayerExitColshape(Colshape colshape, CancelEventArgs cancel)

Required Parameters

  • colshape: colshape, expects RAGE.Elements.Colshape type.
  • cancel: cancel, expects RAGE.Events.CancelEventArgs type.

Example

public void OnPlayerExitColshape(RAGE.Elements.Colshape colshape, RAGE.Events.CancelEventArgs cancel)
{
    RAGE.Chat.Output("You exited colshape id: " + colshape.Id);
}

References