SHARE
TWEET

Nametag

okaz_ Jan 27th, 2020 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. command /nametag [<text>] [<player>] [<text>]:
  2.     trigger:
  3.         if arg 1 is not "prefix" or "suffix" or "nickname":
  4.             send "&cUsage: /nametag <prefix|suffix|nickname> <Player> <Text>"
  5.             stop
  6.         if arg 2 is not set:
  7.             send "&cUsage: /nametag %arg 1% <Player> <Text>"
  8.             stop
  9.         if arg 3 is not set:
  10.             send "&cUsage: /nametag %arg 1% %arg 2% <Text>"
  11.             stop
  12.         if arg 1 is "prefix":
  13.             if sender does not have permission "tablist.prefix":
  14.                 send "&cError: You do not have permission to do this."
  15.                 stop
  16.             set {tablist.%arg 2%.prefix} to coloured arg 3
  17.             send "&bSuccess: Changed %arg 2%'s tablist prefix to &r%coloured arg 3%"
  18.             stop
  19.         if arg 1 is "suffix":
  20.             if sender does not have permission "tablist.suffix":
  21.                 send "&cError: You do not have permission to do this."
  22.                 stop
  23.             set {tablist.%arg 2%.suffix} to coloured arg 3
  24.             send "&bSuccess: Changed %arg 2%'s tablist suffix to &r%coloured arg 3%"
  25.             stop
  26.         if arg 1 is "nickname":
  27.             if sender does not have permission "tablist.nickname":
  28.                 send "&cError: You do not have permission to do this."
  29.                 stop
  30.             set {tablist.%arg 2%.nick} to coloured arg 3
  31.             send "&bSuccess: Changed %arg 2%'s tablist nickname to &r%coloured arg 3%"
  32.             stop
  33.  
  34. every second:
  35.     loop all players:
  36.         if {tablist.%loop-player%.prefix} is not set:
  37.             set {tablist.%loop-player%.prefix} to ""
  38.         if {tablist.%loop-player%.nick} is not set:
  39.             set {tablist.%loop-player%.nick} to loop-player's name
  40.         if {tablist.%loop-player%.suffix} is not set:
  41.             set {tablist.%loop-player%.suffix} to ""
  42.         set loop-player's tablist name to "%{tablist.%loop-player%.prefix}%%{tablist.%loop-player%.nick}%%{tablist.%loop-player%.suffix}%"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top