change the pitch for a gun

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

Char

Member
Mar 15, 2023
1
0
1
24
Skript Version : Skript 2.5.3
Minecraft Version: 1.15.2

OK, I've been trying to build an FPS server for years, and I've realized that there's a problem in the process.

If you change the pitch/yaw through the teleport function provided in Minecraft, it will break off every time you shoot a gun.

I saw a very interesting that writing on the forum, but an error occurred and I couldn't operate it(Plugin version also matched the post context)
"""
[02:45:48] [Server thread/WARN]: net.minecraft.network.protocol.game.PacketPlayOutPosition refers to a non-existent class. (test.sk, line 2: net.minecraft.network.protocol.game.PacketPlayOutPosition')
[02:45:48] [Server thread/ERROR]: The function 'PacketPlayOutPosition' does not exist. (test.sk, line 8: return new PacketPlayOutPosition({_loc}.getX(),{_loc}.getY(),{_loc}.getZ(),{_loc}.getYaw(),{_loc}.getYaw(),{_set},0,true)')
[02:45:49] [Server thread/ERROR]: Can't understand this expression: 'Set.of(PacketPlayOutPosition.EnumPlayerTeleportFlags.a, PacketPlayOutPosition.EnumPlayerTeleportFlags.b, PacketPlayOutPosition.EnumPlayerTeleportFlags.c)' (test.sk, line 10: set {_set} to Set.of(PacketPlayOutPosition.EnumPlayerTeleportFlags.a, PacketPlayOutPosition.EnumPlayerTeleportFlags.b, PacketPlayOutPosition.EnumPlayerTeleportFlags.c)')
[02:45:49] [Server thread/ERROR]: The function 'PacketPlayOutPosition' does not exist. (test.sk, line 11: return new PacketPlayOutPosition(0,0,0,{_loc}.getYaw(),{_loc}.getPitch(),{_set},0,true)')
"""


Can someone help me?
I'm sorry I asked for something annoying from the beginning :emoji_grinning:
 
Status
Not open for further replies.