Skip to content

Library to obtain information about vehicle components in SA-MP.

License

Notifications You must be signed in to change notification settings

markski1/SAMP-vModData

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

vModData

Library to obtain information about vehicle components in SA-MP.

Installation

If you have vSync

Make sure to include vModData AFTER vSync. This way, vModData will re-use certain parts of vSync instead of adding them again, and it'll ensure the best possible compatibility.

If you don't have vSync

Include vModData anywhere after the base samp includes.

Functions and Usage

vModData is short and simple. It's functions are as follows:

Vehicle support functions

Function Behaviour
VehicleSupportsComponent(modelid, cid) Returns true if the given vehicle model supports the given component, false if otherwise.
VehicleSupportsAnyComponent(modelid) Same as above, but returns wether the vehicle supports ANY component whatsoever.
VehicleSupportsCarmodSlot(modelid, carmodtype) Similar to VehicleSupportsComponent, this one instead returns wether any component of a given component slot is supported.
VehicleSupportsNitro(modelid) Returns true if the vehicle supports nitrous, false if otherwise.

Component data getters

Function Behaviour
GetComponentName(cid) Returns a string containing the name of the given component.
GetComponentPrice(cid) Returns the single player price of the given component.
GetComponentSlot(cid) Returns the component slot where the given component belongs.

Miscelaneous

Function Behaviour
IsComponentType(cid, carmodtype) Returns wether the given component belongs in the given component slot.
IsValidComponent(cid) Returns wether the given component id is valid.

TODO

  • No ideas at the moment. Feel free to open an issue and make suggestions.

Known bugs

  • None at the moment. Report bugs by opening an issue.

How to collaborate

Just open a Pull Request with your code.

About

Library to obtain information about vehicle components in SA-MP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages