1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

If player joins event

Discussion in 'Skript' started by ConLudi, Mar 25, 2020 at 1:37 AM.

  1. ConLudi

    ConLudi Member

    Joined:
    Jan 23, 2020
    Messages:
    6
    Likes Received:
    0
    Is there an "If player joins" and "if player is"

    For example:

    on join
    if player is "Player"

    Thanks.
    --- Double Post Merged, Mar 25, 2020 at 1:40 AM, Original Post Date: Mar 25, 2020 at 1:37 AM ---
    Oh and, is there a first player join event for players that have joined?

    I want to send something but for the first time they join when the Skript was made?

    Example:

    on join
    if player is "Player"
    execute console command "book send Player retirement"

    Thanks (I'm trying to make a book where when people retire they see a book, but only for the time they join when the Skript was made.)
    --- Double Post Merged, Mar 25, 2020 at 1:44 AM ---
    Version: 2.2-dev25
    --- Double Post Merged, Mar 25, 2020 at 1:57 AM ---
    Actually, is there a "When player is online" event?
     
  2. Selvati

    Selvati Well-Known Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    9
    Hey hopefully this helps, be sure to use the docs and google to search for answers and clues. Anyway, here's a very basic example of what you're asking for, good luck.

    Code (Text):
    1. # Basic 'on join' event, checking the player's username, then do stuff if it is them
    2. # See https://docs.skunity.com/syntax/search/on%20join
    3. on join:
    4.     if player is "Selvati":
    5.         send "Hi, Selvati!"
    6.        
    7. # Basic 'on first join' event, this does stuff only the very first time a player joins the server
    8. # See https://docs.skunity.com/syntax/search/on%20first%20join
    9. on first join:
    10.     broadcast "Welcome %player% to the server!"
     
  3. ConLudi

    ConLudi Member

    Joined:
    Jan 23, 2020
    Messages:
    6
    Likes Received:
    0
    Yes, But is there a When player is only?
    --- Double Post Merged, Mar 25, 2020 at 4:04 AM, Original Post Date: Mar 25, 2020 at 3:59 AM ---
    Is there a when player is online event where and it won't do it again?
     
  4. egamer3000

    egamer3000 Member

    Joined:
    Nov 25, 2019
    Messages:
    12
    Likes Received:
    1
    loop all players in a join/every (something) (something) event?
     
Loading...