pawn-lang / sa-mp-fixes

Includes and plugins to fix various issues in the SA:MP server that can be fixed externally, leaving the devs time for other things.
137 stars 57 forks source link

Some troubles of GetVehicleComponentInSlot function #136

Closed NexiusTailer closed 3 years ago

NexiusTailer commented 3 years ago
  1. The function GetVehicleComponentInSlot doesn't work for CARMODTYPE_STEREO.
  2. Both front bull bars and front bumper components are saved in the CARMODTYPE_FRONT_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
  3. Both rear bull bars and rear bumper components are saved in the CARMODTYPE_REAR_BUMPER slot. If a vehicle has both of them installed, this function will only return the one which was installed last.
  4. Both left side skirt and right side skirt are saved in the CARMODTYPE_SIDESKIRT slot. If a vehicle has both of them installed, this function will only return the one which was installed last.

At least the first thing can be fixed without modifying any function params or something like that.

Mergevos commented 3 years ago

There's vsync library. I think it does fix these bugs.

Mergevos commented 3 years ago

@NexiusTailer, Are there any more bugs. I will be trying to fix at least some of those above soon.

NexiusTailer commented 3 years ago

@Mergevos as for the last created issues (including this one), they were just copied from samp-wiki/bugs section, so I filtered the problems which have been known for a long time and have not been fixed here. Nothing that I actually discovered myself just now, so if you need any other ideas and issues to be fixed, check out bugs article, this repo or already existing and opened fixes.inc issues.

Mergevos commented 3 years ago

@NexiusTailer check if pull #149 is adequate for this fix. I used to copy a part of the code from vSync

Mergevos commented 3 years ago

@NexiusTailer, I've just tried AddVehicleComponent with componentid of 1041 to Elegy model vehicle. Seems like side skirts can't be added for particular side, but for both. It sets both of them.