Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Help me please UDP3 EVENT Opcode 3 and 4
#1
[SRC="java"]case 3:
{
if (room != null)
{
onlyDecrypt(originalbuffer, this.length);
sub_opcode = originalbuffer.readByte();
slot = originalbuffer.readShort();
sub_length = originalbuffer.readShort();
EventType = 0;
if (sub_opcode != 2)
{
EventType = originalbuffer.readInt();
}
if ((EventType & 0x04) > 0)
{
this.x = originalbuffer.readShort();
this.y = originalbuffer.readShort();
this.z = originalbuffer.readShort();
this.camX = originalbuffer.readShort();
this.camZ = originalbuffer.readShort();
this.Area = originalbuffer.readShort(); System.out.println("====================================================");
System.out.println("X : " + x);
System.out.println("Y : " + y);
System.out.println("Z : " + z);
System.out.println("camX : " + camX);
System.out.println("camZ : " + camZ);
System.out.println("Area : " + Area);
}
ByteBuf _buf = Unpooled.buffer(0, this.length).order(ByteOrder.LITTLE_ENDIAN);
_buf.writeByte(4); // OPCODE 4
_buf.writeByte(-1); // SLOT -1
_buf.writeFloat(this.time); // TIME
_buf.writeByte(1); // SESSION
_buf.writeShort(this.length); // LENGTH this.length
_buf.writeShort(0); // EVENT 1
_buf.writeShort(0); // EVENT 2
_buf.writeBytes(this.InternalPacket.copy());
System.out.println(NetworkUtil.printData("Buffer OutPut 3", _buf));
ctx.writeAndFlush(new DatagramPacket(_buf.copy(), p.net));
}
}
break;
}
case 4:
{
if (room != null)
{
for (Player p : room.getPlayers().values())
{
ByteBuf _buf = Unpooled.buffer(0, this.length).order(ByteOrder.LITTLE_ENDIAN);
_buf.writeByte(4); // OPCODE
_buf.writeByte(-1); // SLOT
_buf.writeFloat(this.time); // TIME
_buf.writeByte(1); // SESSION
_buf.writeShort(this.length); // LENGTH
_buf.writeShort(0); // EVENT 1
_buf.writeShort(0); // EVENT 2
_buf.writeBytes(this.InternalPacket.copy());
System.out.println(NetworkUtil.printData("Buffer OutPut 4", _buf));
ctx.writeAndFlush(new DatagramPacket(_buf, p.net));
}
}
break;
}[/SRC]

When i get
[SRC="java"]this.x = originalbuffer.readShort();
this.y = originalbuffer.readShort();
this.z = originalbuffer.readShort();
this.camX = originalbuffer.readShort();
this.camZ = originalbuffer.readShort();
this.Area = originalbuffer.readShort(); [/SRC]
I have to do with Opcode4.
Or i made the wrong structure
Ответ
#2
3 and 4 is a same. https://forum.zone-game.info/showpost.ph...ostcount=6
Ответ
#3
PROGRAMMATOR Написал:3 and 4 is a same. https://forum.zone-game.info/showpost.ph...ostcount=6

When I get posX, posY, posZ, what do I need to do next?
I have no structure
Ответ
#4
Send to all clients for them to see the actual position of a player. kappa

P.S. Before this you need to check player's position data and speed of movement to switch off possibility of teleportation and speedhack and for lag compensation.
Ответ
#5
PROGRAMMATOR Написал:Send to all clients for them to see the actual position of a player. kappa

P.S. Before this you need to check player's position data and speed of movement to switch off possibility of teleportation and speedhack and for lag compensation.

I do not know how to send.

I need a structured way to send value to the client.
Ответ
#6
PROGRAMMATOR Написал:Send to all clients for them to see the actual position of a player. kappa

P.S. Before this you need to check player's position data and speed of movement to switch off possibility of teleportation and speedhack and for lag compensation.
@PROGRAMMATOR Send to all clients where Opcode ?
help me please
Ответ
#7
bmzproject,

Link
Разработка Emu: PiercingBlow 90%, APB Reloaded 100%.
Самый действенный инструмент для самообучения - грабли.
Ответ
#8
Awiion Написал:bmzproject,

Link

When I get x, y, z, camX, camZ, Area
Opcode 3
[SRC="java"]case 3:
{
log.info("Packet Replication Opcode 3 Slot :" + slotID);
if (room != null)
{
onlyDecrypt(originalbuffer, this.length);
sub_opcode = originalbuffer.readByte();
slot = originalbuffer.readShort();
sub_length = originalbuffer.readShort();
EventType = 0;
if (sub_opcode != 2)
{
EventType = originalbuffer.readInt();
}
System.out.println("============================================================================================");
System.out.println("| Sub-Opcode: " + sub_opcode + " | Slot: " + slot + "| Length: " + sub_length + " | EventType: " + EventType + " |");
System.out.println("============================================================================================");
if ((EventType & 0x01) > 0)
{
System.out.println("====================================================");
System.out.println("Action State");
System.out.println(" Condition 1 " + originalbuffer.readShort());
System.out.println(" Condition 2 " + originalbuffer.readShort());
System.out.println("====================================================");
remainvalue += 0x01;
}
if ((EventType & 0x02) > 0)
{
System.out.println("====================================================");
System.out.println("Animation : " + originalbuffer.readShort());
System.out.println("====================================================");
remainvalue += 0x02;
}
if ((EventType & 0x04) > 0)
{
this.x = originalbuffer.readShort();
this.y = originalbuffer.readShort();
this.z = originalbuffer.readShort();
this.camX = originalbuffer.readShort();
this.camZ = originalbuffer.readShort();
this.Area = originalbuffer.readShort();
System.out.println("====================================================");
System.out.println("X : " + x);
System.out.println("Y : " + y);
System.out.println("Z : " + z);
System.out.println("camX : " + camX);
System.out.println("camZ : " + camZ);
System.out.println("Area : " + Area);
System.out.println("====================================================");
remainvalue += 0x04;

}
for (Player p : room.getPlayers().values())
{
log.info("====================================================");
log.info("| Sub-Opcode: " + sub_opcode + " | Slot: " + slot + "| length: " + sub_length + " | EventType: " + EventType + " |");
log.info("====================================================");
ByteBuf _buf = Unpooled.buffer(0, this.length).order(ByteOrder.LITTLE_ENDIAN);
_buf.writeByte(4); // OPCODE 4
_buf.writeByte(-1); // SLOT -1
_buf.writeFloat(this.time); // TIME
_buf.writeByte(1); // SESSION
_buf.writeShort(this.length); // LENGTH this.length
_buf.writeShort(0); // EVENT 1
_buf.writeShort(0); // EVENT 2
_buf.writeBytes(this.InternalPacket.copy());
ctx.writeAndFlush(new DatagramPacket(_buf.copy(), p.net));
}
}
break;
}[/SRC]
What do I do next?
I need an example of how to send values to a client.

Opcode 4
[SRC="java"]case 4:
{
if (room != null)
{
if ((EventType & 0x04) > 0)
{
this.x = originalbuffer.readShort();
this.y = originalbuffer.readShort();
this.z = originalbuffer.readShort();
this.camX = originalbuffer.readShort();
this.camZ = originalbuffer.readShort();
this.Area = originalbuffer.readShort();
System.out.println("====================================================");
System.out.println("X : " + x);
System.out.println("Y : " + y);
System.out.println("Z : " + z);
System.out.println("camX : " + camX);
System.out.println("camZ : " + camZ);
System.out.println("Area : " + Area);
System.out.println("====================================================");
remainvalue += 0x04;

}
for (Player p : room.getPlayers().values())
{
ByteBuf _buf = Unpooled.buffer(0, this.length).order(ByteOrder.LITTLE_ENDIAN);
_buf.writeByte(4); // OPCODE
_buf.writeByte(-1); // SLOT
_buf.writeFloat(this.time); // TIME
_buf.writeByte(1); // SESSION
_buf.writeShort(this.length); // LENGTH
_buf.writeShort(0); // EVENT 1
_buf.writeShort(0); // EVENT 2
_buf.writeBytes(this.InternalPacket.copy());
ctx.writeAndFlush(new DatagramPacket(_buf, p.net));
}
}
break;
}[/SRC]
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  UDP3 MomzGames - Auth Protected (v42) vinne 0 3,428 01-08-2020, 03:02 AM
Последний пост: vinne
  [Source] UDP3 MoMz Auth Protected vinne 0 3,019 01-08-2020, 03:01 AM
Последний пост: vinne
  UDP3 Helicopter animation nikolen 0 2,085 09-01-2019, 08:46 PM
Последний пост: nikolen
  [Help] Point blank UDP3 ON indows 0 1,895 07-04-2019, 03:41 AM
Последний пост: indows
  UDP3 Grenade problem zOne62 5 2,095 12-16-2018, 12:03 PM
Последний пост: zOne62
  How to fix Packet Ping Opcode 97 Udp 3 BallDev 0 1,398 11-28-2018, 08:42 PM
Последний пост: BallDev
  UDP3 POSITION ERROR Comandante9901 13 5,306 10-10-2018, 09:20 AM
Последний пост: ChunkyHunt
  help me UDP3 DeathDataForClient Event Id 2048 bmzproject 2 1,681 07-20-2018, 07:04 AM
Последний пост: battleBugado
  UDP3 answer ManuelDev 3 2,059 07-03-2018, 04:27 PM
Последний пост: bmzproject
  UDP3 Send-back packet ManuelDev 3 1,895 06-29-2018, 12:18 PM
Последний пост: ManuelDev

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)