Exemple #1
0
        private void PlayerSpawned(ExpandoObject spawned)
        {
            if (this.welcomeMessageShown)
            {
                return;
            }

            int    playerId   = API.GetPlayerIndex();
            String playerName = API.GetPlayerName(API.GetPlayerFromServerId(playerId));

            // TODO: Change the message to say "Welcome back" instead of "Welcome" if the player has joined before
            TriggerEvent("chatMessage", "", new int[] { 255, 255, 255 }, this.GetWelcomeMessage(true));
            this.welcomeMessageShown = true;
        }