0.11.1 • Published 12 months ago

@infernus/raknet v0.11.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@infernus/raknet

npm npm npm bundle size

A wrapper of the popular open.mp raknet plugin for samp-node.

You must use an existing polyfill or compile the corresponding GameMode based on it before you can use it.

Getting started

pnpm add @infernus/core @infernus/raknet

Example

import { Player } from "@infernus/core";
import {
  BitStream,
  IPacket,
  PacketIdList,
  OnFootSync,
  BulletSync,
} from "@infernus/raknet";
import type { IBulletSync } from "@infernus/raknet";

IPacket(PacketIdList.OnFootSync, ({ playerId, bs, next }) => {
  const sync = new OnFootSync(bs).readSync();
  console.log(playerId, sync);
  return next();
});

function sendBulletData(from: Player, to: Player | -1, data: IBulletSync) {
  const bs = new BulletSync(new BitStream());
  bs.writeSync(data);
  bs.sendPacket(to);
  bs.delete();
}
0.11.1

12 months ago

0.11.0

1 year ago

0.10.3

1 year ago

0.10.4

1 year ago

0.10.2

1 year ago

0.10.0

2 years ago

0.10.1

2 years ago

0.1.8

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.0.3

2 years ago

0.1.1

2 years ago

0.1.7

2 years ago

0.1.4

2 years ago

0.0.4

2 years ago

0.1.6

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago