samp.directory
← Scripts and libraries

Open-GTO/zvehcomp

Vehicle component system

Library★ 9updated Jul 2023MITPawnsampctl
Open on GitHub

Install with sampctl

sampctl package install Open-GTO/zvehcomp

Run this in your project folder. sampctl downloads the package and what it depends on.

Try it in the Pawn compiler →

Adds its include files, with the libraries it depends on, to the Pawn compiler in your browser, ready to include in a script.

Depends on 1 package

Used by 1 package

README.md

zvehcomp

Vehicle components useful functions.

Usage

new
    compatible_types[ZVEH_MAX_COMPONENT_TYPES],
    compatible_types_count;

GetVehicleCompatibleTypes(400, compatible_types, compatible_types_count);

for (new i = 0; i < compatible_types_count; i++) {
    printf("%d", compatible_types[i]);
}

Functions

GetVehicleComponentTypeId(name[]);
GetVehicleComponentTypeName(type, name[], size = sizeof(name));
GetVehicleCompatibleTypes(model, array[ZVEH_MAX_COMPONENT_TYPES], &array_size);
GetVehicleComponentName(componentid, cname[], size = sizeof(cname));
GetVehicleCompatibleUpgrades(model, array[ZVEH_MAX_COMPONENTS], &array_size);
IsVehicleUpgradeCompatible(model, componentid);
IsVehicleHaveUpgrades(model);

Directives

DirectiveDefault valueCan be redefined
ZVEH_INVALID_COMPONENT_ID255no
ZVEH_MAX_COMPONENTS48no
ZVEH_MAX_COMPONENT_NAME64no
ZVEH_MAX_COMPONENT_TYPES14no
ZVEH_MAX_COMPONENT_TYPE_NAME16no

This page is built from what GitHub publishes about the repository. samp.directory does not host the code. Report a problem with this listing

Open-GTO/zvehcomp: SA-MP Library | samp.directory