JSPM

@infernus/colandreas

0.0.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q45311F
  • License MIT

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

Package Exports

  • @infernus/colandreas

Readme

@infernus/colandreas

npm npm npm bundle size

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

Getting started

pnpm add @infernus/core @infernus/colandreas

Example

import { GameMode, PlayerEvent } from "@infernus/core";
import { init, isPlayerInWater } from "@infernus/colandreas";

GameMode.onInit(({ next }) => {
  init();
  return next();
});

PlayerEvent.onCommandText("water", ({ player, next }) => {
  const info = isPlayerInWater(player);
  if (info)
    player.sendClientMessage(
      "#f00",
      `you are in water, ${JSON.stringify(info)}`
    );
  else {
    player.sendClientMessage("#0f0", "you are not in water");
  }
  return next();
});