#Prefix Bug
1 messages · Page 1 of 1 (latest)
if command contains "vanish":
if {vanished::%player's uuid%} is not set:
set {vanished::%player's uuid%} to true
broadcast "&7[&a+&7] %player's prefix% &7%player% &7joined"
else:
delete {vanished::%player's uuid%}
broadcast "&7[&c-&7] %player's prefix% &7%player% &7has left"
function hex(string: string) :: string:
replace all "&##" in {_string} with "<##"
return formatted join (regex {_string} split at "(?<=<##.{6})") with ">"```
Here is the code
using hex, you need to broadcast formatted "" or send formatted ""
Can i also add a permission to this?
Depends on what you mean with adding a permission to it?
Like it will only detect the ppl who has that perm
Yea, just put a if player has permission "(permission)": in the start or something, and then use send formatted "(your join/leave message)" to all players.
Hope that helps 🙂
Do i need that code underneath it then that does like the function thing?
and then also add a permission on the bottom of the skript right
just use <##D800FB> for the hex color
Where in my code would i add that do?
literally just replace broadcast with broadcast formatted
<##D800FB>Code here for color
I did and nothing happened
Not relevant since its a player prefix you could make a function for converting but just use formatted
Or u can try send formatted "" to all players