Jump to content

1 Screenshot

About This File

This resource provides 3 serverside functions to work with tire smoke color feature of GTA V.

 

Installing

  • Put the files you downloaded in their respective places
  • Add require('tiresmoke') to client_packages/index.js
  • All done

 

Serverside API

/**
 * Sets the tire smoke color of a vehicle.
 * @param {Number} red
 * @param {Number} green
 * @param {Number} blue
 */
vehicle.setTyreSmokeColor(red, green, blue);

/**
 * Gets the tire smoke color of a vehicle.
 * @return {Object} Tire smoke color, will be null if the vehicle doesn't have one set.
 */
vehicle.getTyreSmokeColor();

/**
 * Resets the tire smoke color of a vehicle.
 */
vehicle.resetTyreSmokeColor();

 

Example Code

// Example: /setsmokecol 255 0 0
mp.events.addCommand("setsmokecol", (player, _, r, g, b) => {
    if (!player.vehicle) {
        player.outputChatBox("not in vehicle");
        return;
    }

    player.vehicle.setTyreSmokeColor(Number(r), Number(g), Number(b));
    player.outputChatBox("smoke color set");
});

// Output: "smoke color: {"r":255,"g":0,"b":0}" or "smoke color: null" if you haven't used setsmokecol before
mp.events.addCommand("getsmokecol", (player) => {
    if (!player.vehicle) {
        player.outputChatBox("not in vehicle");
        return;
    }

    player.outputChatBox(`smoke color: ${JSON.stringify(player.vehicle.getTyreSmokeColor())}`);
});

mp.events.addCommand("remsmokecol", (player) => {
    if (!player.vehicle) {
        player.outputChatBox("not in vehicle");
        return;
    }

    player.vehicle.resetTyreSmokeColor();
    player.outputChatBox("smoke color reset");
});

 

Notes

  • Since this script toggles the tire smoke mod (toggleMod 20), it may not work with your car customization script.
  • Setting the tire smoke color of a vehicle, then changing its model will cause visual desync. Apply tire smoke color again/reset it after changing a vehicle's model to not have this issue.
  • Even though NativeDB says setting the RGB to 0, 0, 0 applies independence day tire smoke, all it did for me was make the tire smoke invisible.
  • Future versions of RAGEMP might add tire smoke color sync, if it happens you should stop using this resource.

 

Source code is available on GitHub in case you don't want to download: https://github.com/root-cause/ragemp-tire-smoke

  • Like 2

User Feedback

Create an account or sign in to leave a review

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

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

JamesBeast

   3 of 3 members found this review helpful 3 / 3 members

THANKS SO MUCH

got my tyres Image result for tyre emojismoked 🔥

  • Like 2
Atesh

   2 of 3 members found this review helpful 2 / 3 members

Lets hope that Rage will sync all this basic things in order to increase the power of this MP project.

SnillocTV

   1 of 2 members found this review helpful 1 / 2 members

Beast very nice

Guest Nick

   0 of 1 member found this review helpful 0 / 1 member

Beast 

×
×
  • Create New...