Jump to content

A Skript for /joindate!


rewgwgr

Recommended Posts

Lets get down to Business,

 

What I Need:

/lastjoin <player> (tells you when somebody last joined the server)

/joindate (tells you when you first joined the server)

/joindate <player> (tells you when a diffrent player first joined the server, only works if you're opped.)

Date Format, dd/mm/yyyy

 

Thanks! 😁

Link to comment
Share on other sites

on first join:
    set {firstJoin.%uuid of player%} to now

on join:
    set {lastJoin.%uuid of player%} to now

command /lastjoin <offline-player>:
    trigger:
        send "%arg-1% last joined the server on %{lastJoin.%uuid of arg-1%}%." to player

command /joindate [<offline-player>]:
    trigger:
        if arg-1 is set:
            if player is op:
                send "%arg-1% first joined the server on %{firstJoin.%uuid of arg-1%}%." to player
        else:
            send "You first joined the server on %{firstJoin.%uuid of player%}%." to player

As for formatting the time in the dd/mm/yyyy format, you can do that in the skript config file at around line 100 I believe.
Also, not sure if this skript works, I didn't test it.

Link to comment
Share on other sites

What unariginal just sent isn't really good tbh, you should never use `.` inside of your variable indices, using a double colon `::` turns the variable into a list allowing you to do tons more with it. 

commands have a built in Permissions: node so you can just use that, as for the command you can also just do `command x <player = %player%>:` where the arg object will default back to the player if the argument is not set.
 

on first join:
	set {firstJoin::%uuid of player%} to now

on join:
	set {lastJoin::%uuid of player%} to now

command /lastjoin <offline-player=%player%>:
	permission: op
	trigger:
		send "%arg-1% last joined the server on %{lastJoin::%uuid of arg-1%}%."

command /joindate [<offline-player=%player%>]:
	trigger:
		send ("%arg-1% first joined the server on %{firstJoin::%uuid of arg-1%}%." if player is op, else "You first joined the server on %{firstJoin::%uuid of player%}%.")

 

also, for future reference please post any errors additional to your message saying "there are 2 errors" this allows people to troubleshoot it so much quicker.

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...