Jump to content

[REQUEST|SA] How can I swap between two textures of the same model?


Recommended Posts

Is there a way to swap between two or more textures applied on the same model during the game? For example, I have a weapon_name.txd file containing the main weapon texture and the same texture but with a tint applied to it. So I have main_texture and tint_texture applied to the same model. How can I swap between the two during the gameplay to apply a different texture to my model?


This feature exist for vehicles by script codes
06ED: set_car 1@ paintjob 0


And for the player model
0053: $PLAYER_CHAR = create_player #NULL at 2488.562 -1666.865 12.8757
09C7: change_player $PLAYER_CHAR model_to #FAM1

------------------------------------

Or for Spray TAG objects by another method
See into
tags2_LAlae.txd

and in
dynamic2.ide for
1490, tag_01, tags2_LAlae, 100, 1048580

This feature is hadcoded and requires the use of spraycan weapon
------------------------------------


then there is this script code

08F0: set_cutscene_model 'GANGRL3' texture 'GFRIEND' // 8-byte strings
08F0 APPEND_TO_NEXT_CUTSCENE()

i don't know what to do with it, seems to be made for cutscene
08F0: set_cutscene_model 'GFPIZ1' texture 'GFPIZ1' // 8-byte strings
08F0: set_cutscene_model 'GFPIZ2' texture 'GFPIZ2' // 8-byte strings
02E4: load_cutscene_data 'DATE1A'

-------------------------------

but nothing for weapon, i think you have to create several weapons of same model with different texture
and each has own ide and weapon data

-------------------------------


Or ask DK22Pac, he made new opcodes for cleo and applied textures everywhere he want

 

On 2/21/2020 at 2:52 PM, ZAZ said:


This feature exist for vehicles by script codes
06ED: set_car 1@ paintjob 0


And for the player model
0053: $PLAYER_CHAR = create_player #NULL at 2488.562 -1666.865 12.8757
09C7: change_player $PLAYER_CHAR model_to #FAM1

------------------------------------

Or for Spray TAG objects by another method
See into
tags2_LAlae.txd

and in
dynamic2.ide for
1490, tag_01, tags2_LAlae, 100, 1048580

This feature is hadcoded and requires the use of spraycan weapon
------------------------------------


then there is this script code

08F0: set_cutscene_model 'GANGRL3' texture 'GFRIEND' // 8-byte strings
08F0 APPEND_TO_NEXT_CUTSCENE()

i don't know what to do with it, seems to be made for cutscene
08F0: set_cutscene_model 'GFPIZ1' texture 'GFPIZ1' // 8-byte strings
08F0: set_cutscene_model 'GFPIZ2' texture 'GFPIZ2' // 8-byte strings
02E4: load_cutscene_data 'DATE1A'

-------------------------------

but nothing for weapon, i think you have to create several weapons of same model with different texture
and each has own ide and weapon data

-------------------------------


Or ask DK22Pac, he made new opcodes for cleo and applied textures everywhere he want

 

Ok, thank you for your answer. I will try some 'alrernative' methods for now.

I have another question. Is there an opcode or something else that allows me to detach a child object from my 3d model hierarchy? For example, if I have a 'magazine' object in my 'weapon' 3d model, can I isolate it and make it, for example, disappear or move indipendently from his parent model?

On 2/25/2020 at 5:06 PM, BDC_Osiris said:

Ok, thank you for your answer. I will try some 'alrernative' methods for now.

I have another question. Is there an opcode or something else that allows me to detach a child object from my 3d model hierarchy? For example, if I have a 'magazine' object in my 'weapon' 3d model, can I isolate it and make it, for example, disappear or move indipendently from his parent model?

No.

  • excuseme 1

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.