Library to obtain information about vehicle components in SA-MP.
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.
Include vModData anywhere after the base samp includes.
vModData is short and simple. It's functions are as follows:
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. |
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. |
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. |
- No ideas at the moment. Feel free to open an issue and make suggestions.
- None at the moment. Report bugs by opening an issue.
Just open a Pull Request with your code.