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!
{"players":{"max":50,"online":1,"sample":[{"name":"nameHereee32","id":"1237b62705636b5-b126-dc590f047768"}]},"description":"","version":{"protocol":47,"name":"Spigot 1.8.8"}}
add player to {sql_.invis::*}
set {_numGlobal} to size of all bungeecord players
set {_invis} to size of {sql_.invis::*}
broadcast "%{_numGlobal}-{_invis}%"
You have to find the correct parts of the json to modify to change what you want to change. Here, you want to change the amount of online players, so you can see that the number matched with "online" is probably the number you want to change. Since the number is matched up with "online" and is in the object (indicated by {}) matched with "players", you need to change the index "players:: online" in your list variable, so@Tlatoani It just says random things like
I am a big noob with Packets so I don't know what to do next :/code_language.skript:{"players":{"max":50,"online":1,"sample":[{"name":"nameHereee32","id":"1237b62705636b5-b126-dc590f047768"}]},"description":"","version":{"protocol":47,"name":"Spigot 1.8.8"}}
Here is my Vanish script, if that helps.
code_language.skript:add player to {sql_.invis::*} set {_numGlobal} to size of all bungeecord players set {_invis} to size of {sql_.invis::*} broadcast "%{_numGlobal}-{_invis}%"
set {_server info::players::online} to 50
[17:21:15] [Server thread/INFO]: [MundoSK] Field 0, Class = class java.util.ArrayList: [PlayerInfoData{latency=0, gameMode=CREATIVE, profile=com.mojang.authlib.GameProfile@7008814f[id=b5555987-25cd-4ddb-9a9d-218aa1141551,name=sky_high,properties={textures=[com.mojang.authlib.properties.Property@21e1a8e]},legacy=false], displayName=null}]
[17:21:15] [Server thread/INFO]: [MundoSK] Packet Info End
You will need to set up a packet event with the right packettype. I believe it is play_server_named_sound_effect, but I am not 100% sure. Then you just cancel the event.@Tlatoani how do i cancel a player hit sound
i want to make a sound when the victim gets hit and is wearing an enchanted diamond armor, but both player hit sound plays, and my sound
You can use@Tlatoani It works, but I want to Cancel the player hit sound not all
string pinfo 0 of %packet%
You can just do something like this:What i dont understand im bad with packets
if "%string pinfo 0 of event-packet%" is "entity.player.hurt":
cancel event
You have to put it inside the packet event.can't understand this event: 'if "%string pinfo 0 of event-packet%" is "entity.player.hurt"'
and do you know how to only disable it when the victim has diamond armor enchanted on?
I am not sure why you are still hearing the sound, but you can try to further debug the issue:i can still hear the sound
help.
i also tried game.player.hurt
on packet event play_server_named_sound_effect:
broadcast "%string pinfo 0 of event-packet%"
if "%string pinfo 0 of event-packet%" is "game.player.hurt":
broadcast "Sound game.player.hurt detected, cancelling event"
cancel event
else:
broadcast "Not game.player.hurt, not cancelling event"
on packet event play_server_named_sound_effect:
if "%string pinfo 0 of event-packet%" is "game.player.hurt":
broadcast "&a1"
cancel event
broadcast "&a2"
else:
broadcast "&c3"
The different versions could be the issue, but I'm not sure how you would fix that.code_language.skript:on packet event play_server_named_sound_effect: if "%string pinfo 0 of event-packet%" is "game.player.hurt": broadcast "&a1" cancel event broadcast "&a2" else: broadcast "&c3"
When I hit the player, both 1 and 2 gets broadcasted, but the sound still happens..
I'm using 1.11.2 client on Spigot 1.8.9 could that be the issue
I don't think that is the issue, but if you want, the volume I think is@Tlatoani maybe skript cant "cancel event"?
Is there a way to make the sound volume 0?
on skUnity docs if you search for sound, RandomSK will pop up on "how to cancel sound", and it says there the plugin isnt cancelling it, just making the volume 0. I tried downloading RandomSK, but it gave me errors.
float pnum 0 of event-packet