Jump to content
RAGE Multiplayer Community

Texture Variation Sync 1.0.0

   (3 reviews)

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);
});

 


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

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

tnx i guess

🙂

Link to comment
Captien

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

thanks for free gaming black chair bro)

Link to comment
×
×
  • Create New...