What's new

Discussion Car Colour Changer? Script

Duck

Duck

Quack Quack!
MotM Sinner
Messages
7,316
Reaction score
4,862
Points
1,670
Sin$
0
Anyone willing to give this out or shed any light on how it's done?
 
O

-Unbound

Enthusiast
Messages
133
Reaction score
20
Points
70
Sin$
0
Send blade a message seen him with it yesterday he would probably give it to you :biggrin:
 
D

Deleted member 117745

Reefer Smoker
Messages
2,393
Reaction score
1,924
Points
365
Sin$
0
Send blade a message seen him with it yesterday he would probably give it to you :biggrin:
he won't if he wants anything else from me for this game :wink:

but honestly, it isn't hard it literally took me like 10 minutes to figure out.
 
Duck

Duck

Quack Quack!
MotM Sinner
Messages
7,316
Reaction score
4,862
Points
1,670
Sin$
0
he won't if he wants anything else from me for this game :wink:

but honestly, it isn't hard it literally took me like 10 minutes to figure out.

Why won't you release it? It's only changing a vehicle colour...:/
 
oRootedBladeTKo

oRootedBladeTKo

Call Of Booty MILF
Messages
927
Reaction score
482
Points
150
Sin$
7
Mr Genius, and now me and blaide (and whoever works with blaide) =) We got dem neonz too yo! (well he's close, but i got em)
Ghost send me message on xbox on what you used please :smile:
 
oRootedBladeTKo

oRootedBladeTKo

Call Of Booty MILF
Messages
927
Reaction score
482
Points
150
Sin$
7
Mr Genius, and now me and blaide (and whoever works with blaide) =) We got dem neonz too yo! (well he's close, but i got em)
And ghost have i given anything to you ??
like your just joined my game and you had neons that everyone can see and all ?
 
VcS Terror

VcS Terror

Contributor
Modder Seasoned Veteran Grizzled Veteran
Messages
2,006
Reaction score
1,151
Points
385
Sin$
7
Can just get car colors by making spawns, sure that script would make it easier but it's really not needed.
 
PCMasterRace

PCMasterRace

Glorious
Legendary Veteran Fabled Veteran
Messages
4,443
Reaction score
1,463
Points
545
Sin$
0
Can just get car colors by making spawns, sure that script would make it easier but it's really not needed.
You can change your car color while your driving, it is necessary because otherwise we have to spawn the same car like 5 times to get your desired color.
 
x VeNoMzZ x

TRT x AIRBORNE

Enthusiast
Messages
152
Reaction score
30
Points
85
Sin$
0
Duck if you can find which part of the code it is I will take a look at the native code and maybe get it working, i'm guessing it's a code just like for the vehicle or maybe it's part of the hash for that. :cool:
 
Lost4468

Lost4468

Contributor
Messages
2,202
Reaction score
1,760
Points
310
Sin$
0
it's the assembly language that you don't understand, which i do agree is very confusing. what i would recommend is try making edits in assembly language, and noting the changes it makes in open iv preview (this way you can see the high level code)

it makes it much easier to understand, that's how i've begun to learn how assembly language works.
I used to do this until I realized the open iv preview sucks, it will give you errors a lot of the time when there isn't any errors as it doesn't actually correctly read the code.
with what? i never said i haven't asked for help, but not on something as simple as this.
If you're not going to help don't be a ***** and start bragging about it, there was a time when you wouldn't of had a clue what to do either. If people asking for help gets you mad then perhaps you shouldn't participate in a forum which is full of it or perhaps you should just ignore these threads instead of coming in and starting ****.


On topic, here's my code to a constantly flashing car if you want it, it's very easy to adapt to a colour you want to pick (if you can't do this you should look at smaller scripts). I added comments as well.

Code:
        //check if the player is in a car, otherwise there'll probably be issues or at the very least wasted cpu cycles
        if (IS_CHAR_IN_ANY_CAR(GetPlayerPed()))
        {
            //get the car and put it into a variable called car
            Car car;
            GET_CAR_CHAR_IS_USING(GetPlayerPed(), &car);

            //generate random numbers between 0 and 133 for the random colours, these are picked from the carcols.dat iirc
            int one;
            GENERATE_RANDOM_INT_IN_RANGE(0,133,&one);
            int two;
            GENERATE_RANDOM_INT_IN_RANGE(0,133,&two);
            int three;
            GENERATE_RANDOM_INT_IN_RANGE(0,133,&three);
            int four;
            GENERATE_RANDOM_INT_IN_RANGE(0,133,&four);

            //change the car colour and then the extra colours for the car, done
            CHANGE_CAR_COLOUR(car, one, two);
            SET_EXTRA_CAR_COLOURS(car,three,four);
        }
 
Duck

Duck

Quack Quack!
MotM Sinner
Messages
7,316
Reaction score
4,862
Points
1,670
Sin$
0
I used to do this until I realized the open iv preview sucks, it will give you errors a lot of the time when there isn't any errors as it doesn't actually correctly read the code.

If you're not going to help don't be a ***** and start bragging about it, there was a time when you wouldn't of had a clue what to do either. If people asking for help gets you mad then perhaps you shouldn't participate in a forum which is full of it or perhaps you should just ignore these threads instead of coming in and starting ****.


On topic, here's my code to a constantly flashing car if you want it, it's very easy to adapt to a colour you want to pick (if you can't do this you should look at smaller scripts). I added comments as well.

Code:
        //check if the player is in a car, otherwise there'll probably be issues or at the very least wasted cpu cycles
        if (IS_CHAR_IN_ANY_CAR(GetPlayerPed()))
        {
            //get the car and put it into a variable called car
            Car car;
            GET_CAR_CHAR_IS_USING(GetPlayerPed(), &car);
 
            //generate random numbers between 0 and 133 for the random colours, these are picked from the carcols.dat iirc
            int one;
            GENERATE_RANDOM_INT_IN_RANGE(0,133,&one);
            int two;
            GENERATE_RANDOM_INT_IN_RANGE(0,133,&two);
            int three;
            GENERATE_RANDOM_INT_IN_RANGE(0,133,&three);
            int four;
            GENERATE_RANDOM_INT_IN_RANGE(0,133,&four);
 
            //change the car colour and then the extra colours for the car, done
            CHANGE_CAR_COLOUR(car, one, two);
            SET_EXTRA_CAR_COLOURS(car,three,four);
        }

That's cool, thank you man. I'm going to see what I can do with it but at least you posted the source code.
 
Top Bottom
Login
Register