@infernus/colandreas
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();
});