Skript Creating and removing bound holo objects

  • 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!

Fladsaw

Member
Jul 18, 2022
31
0
6
20
command /givenameholo [<player>] [<text>]:
trigger:
if player is op:
if arg 1 is set:
if arg 2 is set:
create bound holo object "&e%arg-2%" with id "HoloName::%arg-1%" to arg 1 offset by 0, 3.2, 0
send "%arg-2% is now %arg-1%'s nickname." to player
else:
send "Type a nickname for the player." to player
else:
send "Type name of the player."
else:
send "You don't have permission to do that." to player

on quit:
delete holo object "HoloName::%player%"

on join:
create bound holo object "&e%arg-2%" with id "HoloName::%arg-1%" to player offset by 0, 3.2, 0

command /removenameholo [<player>]:
trigger:
if player is op:
delete holo object "HoloName::%arg-1%"





So basically, I am trying to write a code that would set a player a holographic nickname, remove it when player logs off and replace it when player logs in. But obviously, I can only use arguments on commands. Is there a way to provide that?

Note: I'm using HolographicDisplays
 

Attachments

  • 2022-07-18_20.49.00.png
    2022-07-18_20.49.00.png
    46 KB · Views: 125