Quantcast

Jump to content

» «
Photo

CLEO Vehicle texture changer problem.

7 replies to this topic
LtFalcon
  • LtFalcon

    Player Hater

  • Members
  • Joined: 07 Jan 2014

#1

Posted 09 January 2014 - 12:03 PM

Hello,
 
I tried making a CLEO script that should change the texture of a hydra to another texture when you press a certain button but so far I didn't pull it off.
 
This is the script:
{$CLEO .cs}

thread 'PAINT'

:PAINT_1
wait 10 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @PAINT_1
if 
   Actor.DrivingVehicleType($PLAYER_ACTOR, #HYDRA)
else_jump @PAINT_4
0@ = Actor.CurrentCar($PLAYER_ACTOR)
06ED: set_car 0@ paintjob 0  
1@ = 0.0 

:PAINT_2
wait 10 
if 
   Actor.DrivingVehicleType($PLAYER_ACTOR, #HYDRA)
else_jump @PAINT_4 
if and
  1@ == 0.0 
00E1:   player 0 pressed_key 53 
else_jump @PAINT_2 
06ED: set_car 0@ paintjob 1 
1@ = 1.0
JUMP @PAINT_3

:PAINT_3
wait 10 
if 
   Actor.DrivingVehicleType($PLAYER_ACTOR, #HYDRA)
else_jump @PAINT_4 
if and
  1@ == 1.0 
00E1:   player 0 pressed_key 54 
else_jump @PAINT_4

:PAINT_4
if 
056E:   car 0@ defined 
else_jump @PAINT_1 
Car.RemoveReferences(0@)
jump @PAINT_1 
end_thread

I added a texture called Hydra1 to gta3.img with an image editor and all I want is to switch between the default texture of a hydra and the added hydra1 texture.

 
Hydra1 is a texture for a normal hydra, not for a mod, so that is not the problem.
 
Could any of you guys point out what is wrong with my script?
 
Thanks alot in advance!
 

ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#2

Posted 09 January 2014 - 02:25 PM

so far i know, does the default vehicle txd need to contain a remap-textur, to can apply a paintjobtextur
examples:
blade.txd: remapblade92body128
flash.txd: remapflash92body256
elegy: remapelegybody128

Shmoopy
  • Shmoopy

    Thug (͡ ͜ʖ ͡)

  • Members
  • Joined: 16 Jun 2009
  • None

#3

Posted 09 January 2014 - 02:28 PM

Rockstar hasn't give the Hydra a color or a paintjob , so if you want to change the texture you should do it with TXD editor , i think thats the only way to do it .


LtFalcon
  • LtFalcon

    Player Hater

  • Members
  • Joined: 07 Jan 2014

#4

Posted 09 January 2014 - 02:33 PM Edited by LtFalcon, 09 January 2014 - 02:34 PM.

Ok thanks, overlooked that.

 

But if I were to use this script on a "blade" by replacing HYDRA with BLADE.  Would it work?

Also adding another texture to GTA3.img called blade1 ofcourse.


LtFalcon
  • LtFalcon

    Player Hater

  • Members
  • Joined: 07 Jan 2014

#5

Posted 09 January 2014 - 02:50 PM

I did use a paintchanger on a hydra once though. But that was when I also installed a .dff mod. That was together with about 5 extra textures.

 

How come you can change a hydra texture with opcode 06ED when you have a .dff mod installed?


ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#6

Posted 09 January 2014 - 06:29 PM Edited by ZAZ, 09 January 2014 - 06:31 PM.

i already gave the answer

and furthermore the modded hydra dff have assignement to a remap texture


LtFalcon
  • LtFalcon

    Player Hater

  • Members
  • Joined: 07 Jan 2014

#7

Posted 09 January 2014 - 07:59 PM

Thanks alot ZAZ!

 

Could you take a look at my script as well, cause it doesnt work. Even when I have a modded hydra with textures installed.

I know the problem is my code because I tried another paint changer on this mod and that worked.

 

Thanks alot in advance!


ZAZ
  • ZAZ

    Kernlochbohrer

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union

#8

Posted 10 January 2014 - 02:24 PM Edited by ZAZ, 10 January 2014 - 02:29 PM.

try it with opcode version
03C0: 0@ = actor $PLAYER_ACTOR car
instead
0@ = Actor.CurrentCar($PLAYER_ACTOR)

and wait 0 is enough

below a bit improved and simple
{$CLEO .cs}
thread 'PAINT' 

while true
wait 0 
    if 
    Player.Defined($PLAYER_CHAR)
    then
        if 
            Actor.DrivingVehicleType($PLAYER_ACTOR, #blade)
        then
            03C0: 0@ = actor $PLAYER_ACTOR car
            06ED: set_car 0@ paintjob 0
            wait 1000
            06ED: set_car 0@ paintjob 1
        end
        wait 5000
    end   
end
note: the Actor.Driving check have #blade instead #hydra
try it first with blade, to see that it works




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users