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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Fladsaw

Member
Jul 18, 2022
31
0
6
21
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 do that?

Note: I have HolographicDisplays installed.
 

Attachments

  • 8000_6f0e3bed63b87e750035d7b329f42fae.png
    8000_6f0e3bed63b87e750035d7b329f42fae.png
    46 KB · Views: 94
Status
Not open for further replies.