Jump to content

About This File

Requires RAGE Multiplayer 1.1.0 and above.

This resource adds 2 new functions to mp.Object that provides texture variation sync.

If you don't know the purpose of prop texture variations, you should check out GTA Online's stunt maps/props and yacht styles.

 

Installing

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

 

Serverside API

/**
 * Sets the texture variation of the object.
 * @param {number} textureVariation Texture variation index.
 */
object.setTextureVariation(textureVariation);

/**
 * Returns the texture variation of the object.
 * @return {number}
 */
object.getTextureVariation();

 

Example

This snippet was used during development:

const gamerChair = mp.objects.new("gr_prop_highendchair_gr_01a", new mp.Vector3(-425.517, 1123.620, 325.8544));
gamerChair.setTextureVariation(1);

mp.events.addCommand("chaircol", (player, colorIndex) => {
    colorIndex = Number(colorIndex);

    if (!Number.isInteger(colorIndex)) {
        player.outputChatBox("Usage: /chaircol [color index]");
        return;
    }

    gamerChair.setTextureVariation(colorIndex);
});

mp.events.addCommand("spawntube", (player, colorIndex) => {
    colorIndex = Number(colorIndex);

    if (!Number.isInteger(colorIndex)) {
        player.outputChatBox("Usage: /spawntube [color index]");
        return;
    }

    const tube = mp.objects.new("bkr_prop_biker_tube_xxs", player.position);
    tube.setTextureVariation(colorIndex);
});

 

  • Mask 1

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

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

tnx i guess

🙂

Captien

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

thanks for free gaming black chair bro)

n0minal

  

Awesome! Thank  you

×
×
  • Create New...