OnPlayerEnterColShape: Difference between revisions
(Created page with "This event is triggered when a player enters a colshape. {{CSharpContainer| {{#tag:syntaxhighlight| [ServerEvent(Event.PlayerEnterColshape)] |lang=csharp }} {{Parameters}} *...") |
No edit summary |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 9: | Line 9: | ||
{{Parameters}} | {{Parameters}} | ||
*'''shape:''' parameter input should be in '''ColShape''' type | *'''shape:''' parameter input should be in '''ColShape''' type | ||
*'''player:''' parameter input should be in ''' | *'''player:''' parameter input should be in '''Player''' type | ||
{{Example}} | {{Example}} | ||
{{#tag:syntaxhighlight| | {{#tag:syntaxhighlight| | ||
[ServerEvent(Event. | [ServerEvent(Event.PlayerEnterColshape)] | ||
public void OnPlayerEnterColshape(ColShape shape, | public void OnPlayerEnterColshape(ColShape shape, Player player) | ||
{ | { | ||
player.SendChatMessage($"You entered {shape. | player.SendChatMessage($"You entered {shape.Id}."); | ||
} | } | ||
|lang=csharp}} | |lang=csharp}} | ||
Latest revision as of 05:48, 9 May 2023
This event is triggered when a player enters a colshape.
C# Syntax
[ServerEvent(Event.PlayerEnterColshape)]
Parameters
- shape: parameter input should be in ColShape type
- player: parameter input should be in Player type
Example
[ServerEvent(Event.PlayerEnterColshape)]
public void OnPlayerEnterColshape(ColShape shape, Player player)
{
player.SendChatMessage($"You entered {shape.Id}.");
}