← Scripts e bibliotecas
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★ 0atualizado ontemMITC++
Abrir no GitHubTestar no compilador Pawn →
Adiciona os arquivos de include dele, com as bibliotecas de que depende, ao compilador Pawn no seu navegador, prontos para incluir num script.
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.
Esta página é montada com o que o GitHub publica sobre o repositório. O samp.directory não hospeda o código. Avisar de um problema com esta página