← Скрипты и библиотеки
markski1/SAMP-vModData
Library to obtain information about vehicle components in SA-MP.
Библиотека★ 2обновлён май 2023 г.MITPawn
Открыть на 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.
Страница собрана из того, что GitHub публикует о репозитории. samp.directory не хранит этот код. Сообщить о проблеме с этой записью