Jump to content

Recommended Posts

Posted

Hey guys,

after spawning a vehicle with:

mp.events.addCommand('car', (player) => {
    const vehicle = mp.vehicles.new(mp.joaat("zentorno"), new mp.Vector3(player.position),
    {
        numberPlate:"ADMIN"
    });
    vehicle.setColor(134,135);
});

I´m trying to console log the vehicles pirmary and secondary color:

mp.events.addCommand('farbe', (player) => {
    console.log("primary", player.vehicle.getColor(0));
    console.log("secondary", player.vehicle.getColor(1));
});

 The console only displays the primary color correctly. The secondary color is always displayed as "0".

Somebody help me pls.

Regards,

rp_zuschauer

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...