Перейти к содержанию

OnPlayerConnected

Материал из RAGE MP Wiki Archive

This event is triggered when a player joins the server.


<syntaxhighlight lang="csharp"> [ServerEvent(Event.PlayerConnected)] </syntaxhighlight>

Parameters

  • player: parameter input should be in Player type

Example

<syntaxhighlight lang="csharp"> [ServerEvent(Event.PlayerConnected)] public void OnPlayerConnect(Player player) { player.SendChatMessage($"Welcome to RAGE:Multiplayer {player.Name}"); } </syntaxhighlight>