openmultiplayer / openmultiplayer/open.mp

ChangeVehiclePaintjob - can't remove paintjob if vehicle has 4 paintjobs

Open
#677 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement samp-bug
Dominant language
C++
Stars
641
Forks
208
PR merge metrics
No merged PRs in 30d

Description

The paintjob limit of the game is 5 - one default paintjob and 4 custom ones.

The current ChangeVehiclePaintjob implementation says id 3 should be used to remove a paintjob, but if the vehicle is modded and has 4 custom paintjobs, it seems it's impossible to remove the paintjob.

Perhaps id -1 (minus one) could be used to properly remove a paintjob no matter how many the vehicle has?

Also it would be good to increase the paintjob limit as well, it seems they "wrap around" at id 256, so it would be cool to have that many, useful for racing liveries for example. But that might be too much to ask.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ChangeVehiclePaintjob implementation and reproduce the case with a vehicle containing four custom paintjobs. Verify how paintjob id 3 behaves at that limit and define completion as reliably removing a paintjob. The separate request to increase the limit, including the reported wraparound at id 256, needs scope clarification before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.