← Scripts y librerías
markski1/SAMP-vModData
Library to obtain information about vehicle components in SA-MP.
Librería★ 2actualizado may 2023MITPawn
Abrir en GitHubREADME.md
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.
Esta página se genera con lo que GitHub publica sobre el repositorio. samp.directory no aloja el código. Informar de un problema con esta ficha