A wrapper of the popular SA-MP ColAndreas plugin for samp-node.
npm install @infernus/colandreas !npm !npm bundle size
A wrapper of the popular SA-MP ColAndreas plugin for samp-node.
``sh`
pnpm add @infernus/core @infernus/colandreas
`ts
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();
});