Solved Force players to use server's Texture Pack

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

FlameikTV

Member
May 22, 2020
19
2
3
24
Hi,
I'm looking for some solution for forcing player's to use server's texture pack. I have tried to Google something, but it was little outdated or it wasn't been working. I have tried this code, but it didn't work.

Code:
on join:
    wait 1 second
    send resource pack from "infinityland.eu/TexturePack/InfinityLand-Pack.rar" to player

on packet event play_client_resource_pack_status:
    if "%""ResourcePackStatus"" pinfo 0 of event-packet%" = "DECLINED":
        kick player due to "&cYou need download the resource pack for stay playing here ;)"
(And yes, I have MundoSK and ProtocolLib..)

Maybe somebody could help me with this :emoji_smile:
Thank you :emoji_heart:

[doublepost=1614793603,1614708291][/doublepost]Hey,
I figured it out after 1 day :emoji_grinning:

I'm using this code, and I have also placed same link in server.properties file (idk if it has something to do with that, but it works now) and it works!
Code:
on join:
    wait 20 ticks
    send resource pack from "https://www.dropbox.com/s/e3qxmaszob9gleh/InfinityLandRP.zip?dl=1" to player

on packet event play_client_resource_pack_status:
    if "%""ResourcePackStatus"" pinfo 0 of event-packet%" = "DECLINED":
        kick player due to "&4&l[RESOURCE PACK]%newline%&c&oByl/a jste vyhozen/a ze serveru z důvodu zamítnutí Resouce Packu.%newline%&r%newline%&7&oPro hru na serveru je nutné mít nainstalovaný%newline%&7&oa aktivní náš speciální Resource Pack..%newline%&r%newline%&r%newline%&eNáhradní možnosti instalace Resource Packu naleznete na:%newline%&6&lwww.InfinityLand.eu/ResourcePack%newline%&r%newline%&r%newline%&8© by InfinityLand.eu 2021"
I have been looking for some solution all day and now it works, maybe somebody has same problem as me..

Marked as solved
 
You can also use `on resource pack response` and `if resource pack was denied or failed to download`
 
Status
Not open for further replies.