← Skripte und Bibliotheken
by-not/not_vehicle_system
All-in-one SA-MP and open.mp vehicle utility library: physical parts, 194 components/upgrades, singleplayer colors, and paintjobs for all 212 models.
Plugin★ 0aktualisiert gesternMITC++
Auf GitHub öffnenIm Pawn-Compiler ausprobieren →
Fügt seine Include-Dateien samt der Bibliotheken, von denen es abhängt, dem Pawn-Compiler in deinem Browser hinzu, bereit zum Einbinden in ein Skript.
README.md
not_vehicle_system
Language: English | Español
All-in-one vehicle utility library for SA-MP and open.mp covering all 212 GTA San Andreas vehicle models (400–611).
Features
- Physical Vehicle Parts (
VEH_PART_*): world/local coordinates, facing angles, player teleportation, range checks, and petrol cap side detection (with optionalColAndreasground Z support). - Components & Upgrades: 14 component types, 194 component names (
1000–1193), and a packed (char) compatibility table for all 212 models. - Singleplayer Colors: valid singleplayer color pairs per vehicle model, random picker, and combination validator.
- Paintjobs: accurate SA-MP paintjob counts, lists, validation, and random selector (
0–2;INVALID_PAINTJOB_ID = 3). - Zero external dependencies: requires only
<a_samp>.
Installation
- Copy
not_vehicle_system.incinto yourpawno/include/(orqawno/include/) directory. - Include it after
<a_samp>:
#include <a_samp>
// Optional: enable ColAndreas ground Z adjustment in GetPosNearVehiclePart
// #define COLANDREAS
#include <not_vehicle_system>
Quick Start
// Check if an upgrade is compatible with a vehicle
new model = GetVehicleModel(vehicleid);
if(IsVehicleUpgradeCompatible(model, 1000))
{
AddVehicleComponent(vehicleid, 1000);
}
// List all compatible upgrades
new comps[VEH_MAX_COMPONENTS], count;
GetVehicleCompatibleUpgrades(411, comps, count);
// Teleport player beside the vehicle's petrol cap
SetPlayerNearVehiclePart(playerid, vehicleid, VEH_PART_PCAP);
// Apply a random valid color pair and paintjob
new c1, c2, pj;
if(GetVehicleRandomValidColor(model, c1, c2))
{
ChangeVehicleColor(vehicleid, c1, c2);
}
if(GetVehicleRandomValidPaintjob(model, pj))
{
ChangeVehiclePaintjob(vehicleid, pj);
}
API Summary
- Parts:
GetPosNearVehiclePart,GetVehiclePartPos,GetVehiclePartAngle,SetPlayerNearVehiclePart,IsPlayerNearVehiclePart,GetVehiclePetrolCapSide,GetVehiclePartName - Components:
GetVehicleComponentTypeId,GetVehicleComponentTypeName,GetVehicleCompatibleTypes,GetVehicleComponentName,GetVehicleCompatibleUpgrades,GetVehicleCompatibleUpByType,IsVehicleUpgradeCompatible,IsVehicleHaveUpgrades - Colors:
GetVehicleValidColors,GetVehicleRandomValidColor,IsValidVehicleColorCombination - Paintjobs:
GetVehicleMaxPaintjobs,IsValidVehiclePaintjob,GetVehicleValidPaintjobs,GetVehicleRandomValidPaintjob - Utilities:
EnsureVehicleComponents8687,CheckVehicleComponents8687
Credits
- Combined and refactored by not.
- Based on original SA-MP vehicle libraries by Ino, Walter-Correa, and ziggi.
License
Released under the MIT License.
Diese Seite wird aus dem erstellt, was GitHub über das Repository veröffentlicht. samp.directory hostet den Code nicht. Ein Problem mit diesem Eintrag melden