All Projects → peterszombati → samp-node-lib

peterszombati / samp-node-lib

Licence: MIT license
NodeJS library for Scripting San Andreas Multiplayer:SAMP depends on samp-node plugin

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to samp-node-lib

protection
Flexible server protection system (development)
Stars: ✭ 23 (+0%)
Mutual labels:  gta, sa-mp, samp, gtasa
rustext
Fix Russian text plugin for SA-MP: GameText's, TextDraw's and Menu's
Stars: ✭ 15 (-34.78%)
Mutual labels:  gta, sa-mp, samp, gtasa
Open-GTO
RPG gamemode for SA-MP
Stars: ✭ 45 (+95.65%)
Mutual labels:  gta, sa-mp, samp, gtasa
gta-samp-mouse-only
Play GTA San Andreas Multiplayer with mouse only and no keyboard
Stars: ✭ 22 (-4.35%)
Mutual labels:  gta-sa, sa-mp, samp, gtasa
GWRP-0.3
Игровой режим для San Andreas Multiplayer
Stars: ✭ 22 (-4.35%)
Mutual labels:  gta, sa-mp, samp, gtasa
VehFuncs
New vehicle features for GTA San Andreas mods
Stars: ✭ 30 (+30.43%)
Mutual labels:  gta, gta-sa, gtasa, gta-san-andreas
gtasa-savegame-editor
GUI tool to edit GTA San Andreas savegames.
Stars: ✭ 56 (+143.48%)
Mutual labels:  gta, gta-sa, gtasa, gta-san-andreas
v2saconv
GTAV > GTASA resource converter. Converts YTD/YDR/YDD/YFT resources to DFF/TXD and generates COL files.
Stars: ✭ 68 (+195.65%)
Mutual labels:  gta-sa, gtasa, gta-san-andreas
pawn-requests
pawn-requests provides an API for interacting with HTTP(S) JSON APIs.
Stars: ✭ 56 (+143.48%)
Mutual labels:  sa-mp, sa-mp-development, sa-mp-plugin
code-parse.inc
Pre-processor macros for analysing PAWN functions.
Stars: ✭ 23 (+0%)
Mutual labels:  sa-mp, samp, sa-mp-development
gtasa-discord-plugin
Discord Rich Presence plugin for GTA:SA
Stars: ✭ 32 (+39.13%)
Mutual labels:  gta-sa, gtasa
SAMP.Lua
A SA-MP API library for MoonLoader
Stars: ✭ 40 (+73.91%)
Mutual labels:  gta-sa, samp
samp-foreach
foreach standalone include (non y_iterate version)
Stars: ✭ 20 (-13.04%)
Mutual labels:  sa-mp, samp
sscanf
SA:MP sscanf plugin
Stars: ✭ 33 (+43.48%)
Mutual labels:  sa-mp, sa-mp-plugin
Pawn.CMD
🚀 Plugin-powered command processor for SA:MP server
Stars: ✭ 80 (+247.83%)
Mutual labels:  sa-mp, samp
trilogymp
Trilogy Multiplayer (TMP) is a work in progress nonprofit open source multiplayer software project for Grand Theft Auto: The Trilogy. This repository serves as a base for discussions and project management.
Stars: ✭ 105 (+356.52%)
Mutual labels:  gta, gtasa
gta-open
A gamemode made for open.mp, using open.mp naming conventions and best coding practices!
Stars: ✭ 59 (+156.52%)
Mutual labels:  sa-mp, sa-mp-development
Pawn.Regex
🔎 Plugin that adds support for regular expressions in Pawn
Stars: ✭ 34 (+47.83%)
Mutual labels:  sa-mp, samp
SS-Gang-System-SQLITE
SS Gang System for SA-MP
Stars: ✭ 23 (+0%)
Mutual labels:  sa-mp, samp
samp-discord-plugin
SA:MP Discord Rich Presence plugin
Stars: ✭ 63 (+173.91%)
Mutual labels:  sa-mp, samp

samp-node-lib

NodeJS library for Scripting San Andreas Multiplayer : SAMP depends on samp-node plugin

some part of source code was auto generated with NodeJS

Getting started

Step 0 install samp-node

Step 1 install samp-node-lib via npm

npm i samp-node-lib

Example usage

import {
    ManualVehicleEngineAndLights,
    OnGameModeInit,
    OnPlayerCommandText
} from "samp-node-lib";

OnGameModeInit(() => {
    ManualVehicleEngineAndLights();
});

//

OnPlayerCommandText((player, cmdtext) => {
    player.SendClientMessage('rgba(255,0,0,1)', cmdtext)
});

Example using for gates

import {
    DynamicObject,
    OnGameModeInit,
    OnPlayerCommandText
} from "samp-node-lib";


let o1: DynamicObject;
let o2: DynamicObject;

OnGameModeInit(() => {
    o1 = new DynamicObject(3049, 808.012, 842.4, 10.9, 0.0, 0.0, 293.198)
        .setOpen(806.29, 846.4, 10.9, 0.0, 0.0, 293.2);
    o2 = new DynamicObject(3050, 808, 842.4, 10.9, 0.0, 0.0, 114.988)
        .setOpen(809.5, 839.2, 10.9, 0.0, 0.0, 114.99);
});

OnPlayerCommandText((player, cmdtext) => {
    if (cmdtext === '/open') {
        o1.open();
        o2.open();
        return 1;
    }
    if (cmdtext === '/close') {
        o1.close();
        o2.close();
        return 1;
    }
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].