# samp-fake-query

> SA:MP Fake Query

Latest version **1.0.2** (published 2023-07-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install samp-fake-query
pnpm add samp-fake-query
yarn add samp-fake-query
bun add samp-fake-query
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-07-04 |
| First published | 2023-07-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ghosty2004 |
| Maintainers | ghosty2004 |
| Keywords | query, samp, samp-query, samp-fake-query |

## Links

- npm: https://www.npmjs.com/package/samp-fake-query
- Repository: https://github.com/ghosty2004/samp-fake-query
- Homepage: https://github.com/ghosty2004/samp-fake-query#readme
- Issues: https://github.com/ghosty2004/samp-fake-query/issues
- npm.io page: https://npm.io/package/samp-fake-query

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2023-07-04
- 1.0.1 — 2023-07-04
- 1.0.0 — 2023-07-03

## README

# Fake SA:MP (San Andreas Multi Player) query

#### With this module you can create SA:MP servers which send back fake query to clients

<img src="https://i.imgur.com/oJDjxOI.png" />

#### Example of usage:

```ts
import { SampServer } from "samp-fake-query";
const server = new SampServer("0.0.0.0", 7777);

// Set server config
server.config.setPassworded(true);
server.config.setPlayersCount(10);
server.config.setMaxPlayersCount(100);
server.config.setHostname("My SA:MP server");
server.config.setGamemode("Unknown");
server.config.setMapname("English");

// Add rules
server.rules.addRule("weburl", "github.com/ghosty2004");
server.rules.addRule("owner", "ghosty2004");

// Add players
server.players.addPlayer(0, "ghosty2004", 1, 1);

// Listen for events
server.on("listening", (ip, port) => {
	console.log(`SA:MP fake query listening on ${ip}:${port}`);
});

server.on("requestData", (clientIp, clientPort, opcode) => {
	console.log(
		`Received request from ${clientIp}:${clientPort} for opcode ${opcode}`
	);
});
```

---
_Source: https://npm.io/package/samp-fake-query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
