Jump to content

Recommended Posts

Posted (edited)

A function that draws a border in a gui.

Made for the TuSKe GUI system.

function border(user: player, rows: number, borderItem: item):
	# user : The player to draw the border for.
	# rows : The number of rows the GUI has.
	# borderItem : The item to draw the border with.
	
	format gui slot (numbers from 0 to 8) of {_user} with {_borderItem}
	loop ({_rows} - 2) times:
		format gui slot (((loop-value) * 9), and ((loop-value) * 9) + 8) of {_user} with {_borderItem}
	format gui slot (numbers from ({_rows} - 1) * 9 to (({_rows} - 1) * 9) + 8) of {_user} with {_borderItem}

Usage:

border(player, 5, gray stained glass pane named "&8")

Enjoy!

Edited by jeelzzz
Added usage

Currently working on a vs code extension for editing server files

  • yes jeelzzz, i do support this vsc code extension - Reassembly
Link to post
Share on other sites

Nice math, though you could probably compact it even further by putting it all into one line 😳

First Joined: Mid-Late 2015
VIP: January 2020
Jr.Mod: 1st April 2020

Info:
~ Skript Developer
~ Discord: @nicholxs#3557
~ Previous names: Deterno, iHaveSkills, Retrical

Link to post
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...