Tire Smoke Color Sync 1.0.0

   (4 reviews)
Sign in to follow this  

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest

Jaimuzu

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

THANKS SO MUCH

got my tyres Image result for tyre emojismoked 🔥

Share this review


Link to review
Atesh

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

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

Share this review


Link to review
SnillocTV

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

Beast very nice

Share this review


Link to review
Guest Nick

  

Beast 

Share this review


Link to review