On_PlayerSpawning

Mar 11, 2018
On_PlayerSpawning
  • Method:
    On_PlayerSpawning

    Argument(s):
    1: Player Player
    2: SpawnEvent evt

    Examples:

    Code (Python):
    def On_PlayerSpawning(self, Player, SpawnEvent):
        if SpawnEvent.CampUsed:
            Logger.Log("Player used bool CampUsed")
            return
        Player.Message("Select a spawn option..")
    Code (Javascript):
    function On_PlayerSpawning(Player, SpawnEvent) {
        if (SpawnEvent.CampUsed) {
            Logger.Log("Player used a spawn option..");
            return;
        }
        Player.Message("Select a spawn option..");
    }


    Code (Lua):

    function On_PlayerSpawning(Player, SpawnEvent)
        if (SpawnEvent.CampUsed) then
            Logger:Log("Player used a spawn option..")
            return
        end
        Player.Message("Select a spawn option..")
    end