Skip to content

Commit

Permalink
feat(fcnpc): didn't work, but it might help someone in the future
Browse files Browse the repository at this point in the history
  • Loading branch information
dockfries committed Oct 24, 2024
1 parent 21bedb5 commit 49fc8ed
Show file tree
Hide file tree
Showing 12 changed files with 3,958 additions and 4,669 deletions.
21 changes: 21 additions & 0 deletions packages/fcnpc/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022-PRESENT Carl You

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
26 changes: 26 additions & 0 deletions packages/fcnpc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# @infernus/fcnpc

[![npm](https://img.shields.io/npm/v/@infernus/fcnpc)](https://www.npmjs.com/package/@infernus/fcnpc) ![npm](https://img.shields.io/npm/dy/@infernus/fcnpc) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@infernus/fcnpc)

A wrapper of the popular [SA-MP FCNPC plugin](https://github.com/ziggi/FCNPC) for samp-node.

> ⚠ WIP, it's unclear whether it will work after future FCNPC open.mp port.
> It might take polyfill to make it work, but I don't think it's a wise choice.
## Getting started

```sh
pnpm add @infernus/core @infernus/fcnpc
```

## Example

```ts
import { FCNPC, FCNPCEvent } from "@infernus/fcnpc";

FCNPCEvent.onInit(({ next }) => {
const fcnpc = new FCNPC("npc_name").create();
fcnpc.spawn(0, 1697.7418, -1600.1525, 13.5469);
return next();
});
```
44 changes: 44 additions & 0 deletions packages/fcnpc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "@infernus/fcnpc",
"version": "0.0.1",
"description": "A wrapper of the popular SA-MP FCNPC plugin for samp-node.",
"keywords": [
"samp",
"sa:mp",
"sa-mp",
"omp",
"open.mp",
"pawn",
"wrapper",
"fcnpc"
],
"homepage": "https://github.com/dockfries/infernus/tree/main/packages/fcnpc#readme",
"bugs": {
"url": "https://github.com/dockfries/infernus/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/dockfries/infernus.git"
},
"license": "MIT",
"author": "dockfries",
"exports": {
".": {
"require": "./dist/bundle.js",
"import": "./dist/bundle.mjs"
}
},
"main": "dist/bundle.js",
"module": "dist/bundle.mjs",
"types": "dist/bundle.d.ts",
"files": [
"dist"
],
"scripts": {},
"devDependencies": {
"@infernus/core": "workspace:^"
},
"peerDependencies": {
"@infernus/core": "workspace:^"
}
}
Loading

0 comments on commit 49fc8ed

Please sign in to comment.