Jump to content

How to mention someone in a skript?


BrageB19

Recommended Posts

I'm new to skript and was wondering how i can say something along the lines of "Welcome (Player name) to the server" The thing thats mostly puzzling me is the player name part, how do you mention someones name in a skript?

Link to comment
Share on other sites

1 hour ago, erha8 said:

In a event like on join: you can use %player% to get the player. example:

 

on first join:
  broadcast "&d%player% is joining for the first time!"

 

^^^^^

Link to comment
Share on other sites

  • 4 weeks later...
On 3/16/2023 at 11:48 PM, erha8 said:

In a event like on join: you can use %player% to get the player. example:

 

on first join:
  broadcast "&d%player% is joining for the first time!"

 

Your code would show both, broadcasting for join messages is just dumb, try something like this.

on join:
    add 1 to {joins}
    set {joins::%Player%} to {joins}
    if player has not played before:
        set join message to "&2%Player% has joined for the first time &7[%{joins::%player%}%]"
    else:
        set join message to "&2%Player% has joined"

on quit:
    set leave message to "&2%player% has left"

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...