0.11.0 • Published 3 months ago

@infernus/raknet v0.11.0

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

@infernus/raknet

npm npm npm bundle size

A wrapper of the popular SA-MP raknet plugin for samp-node.

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

3 months ago

0.10.3

4 months ago

0.10.4

4 months ago

0.10.2

4 months ago

0.10.0

6 months ago

0.10.1

5 months ago

0.1.8

8 months ago

0.1.0

12 months ago

0.1.2

12 months ago

0.0.3

1 year ago

0.1.1

12 months ago

0.1.7

12 months ago

0.1.4

12 months ago

0.0.4

1 year ago

0.1.6

12 months ago

0.0.2

1 year ago

0.0.1

1 year ago