[Include] zvehcomp - useful functions for vehicle components - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] zvehcomp - useful functions for vehicle components (
/showthread.php?tid=621237)
zvehcomp - useful functions for vehicle components -
ZiGGi - 08.11.2016
zvehcomp
About
Useful functions for vehicle components. Very useful for creating tuning systems.
Functions
PHP код:
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);
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(400, compatible_types, compatible_types_count);
for (new i = 0; i < compatible_types_count; i++) {
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
Re: zvehcomp - useful functions for vehicle components -
ZiGGi - 15.12.2017
New version available! Added universal vehicle components (Thanks to Albert Mironov).
Re: zvehcomp - useful functions for vehicle components -
Dayrion - 15.12.2017
Whoa, impressive code we have there. You got a smart and good idea.
I definitely will use it.
Re: zvehcomp - useful functions for vehicle components -
SimonItaly - 15.12.2017
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.
Re: zvehcomp - useful functions for vehicle components -
NaS - 17.12.2017
How did I not see this before?
Really useful and well done!
Re: zvehcomp - useful functions for vehicle components -
Cadilab - 09.07.2018
Just found this,
Really useful!