[Include] zvehcomp - useful functions for vehicle components
#1

zvehcomp
About
Useful functions for vehicle components. Very useful for creating tuning systems.

Functions

PHP код:
GetVehicleComponentTypeId(name[]);
GetVehicleComponentTypeName(typename[], size sizeof(name));
GetVehicleCompatibleTypes(model, array[ZVEH_MAX_COMPONENT_TYPES], &array_size);
GetVehicleComponentName(componentidcname[], size sizeof(cname));
GetVehicleCompatibleUpgrades(model, array[ZVEH_MAX_COMPONENTS], &array_size);
IsVehicleUpgradeCompatible(modelcomponentid);
IsVehicleHaveUpgrades(model); 
Defines
Directive
Default value
Can be redefined
ZVEH_INVALID_COMPONENT_ID 255 no
ZVEH_MAX_COMPONENTS 48 no
ZVEH_MAX_COMPONENT_NAME 64 no
ZVEH_MAX_COMPONENT_TYPES 14 no
ZVEH_MAX_COMPONENT_TYPE_NAME 16 no
Usage
List of all compatible component types:
PHP код:
new
    
compatible_types[ZVEH_MAX_COMPONENT_TYPES],
    
compatible_types_count;
GetVehicleCompatibleTypes(400compatible_typescompatible_types_count);
for (new 
0compatible_types_counti++) {
    
printf("%d"compatible_types[i]);

Download
- GitHub download page: https://github.com/Open-GTO/zvehcomp/releases
- Wiki (English, Russian): https://github.com/Open-GTO/zvehcomp/wiki
Reply
#2

New version available! Added universal vehicle components (Thanks to Albert Mironov).
Reply
#3

Whoa, impressive code we have there. You got a smart and good idea.
I definitely will use it.
Reply
#4

I've been using this since its release on GitHub, I'm surprised there haven't been comments on this since 11/2016.
Awesome include anyway, also thanks for the other Open-GTO libraries.
Reply
#5

How did I not see this before?

Really useful and well done!
Reply
#6

Just found this,
Really useful!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)