Quantcast

Jump to content

» «
Photo

Indicators and reverse lights

14 replies to this topic
G-Modifications
  • G-Modifications

    G

  • Members
  • Joined: 24 Oct 2011

#1

Posted 30 April 2012 - 04:45 PM

Hello

I want to make indicators and reverse lights for cars in GTA SA. I've tried it, but it crashes or doesn't do anything. I don't want to use flairs or something like that. That's to unrealistic.

Does anyone knows how to do this?

G-Modifications

Joni2030
  • Joni2030

    Prankster

  • Members
  • Joined: 06 Jul 2011

#2

Posted 30 April 2012 - 05:20 PM

There is indicators mod http://www.gtagarage...ow.php?id=14581 you need CLEO 4 for this mod

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#3

Posted 30 April 2012 - 05:57 PM Edited by Bad.boy!, 30 April 2012 - 05:59 PM.

Our most beloved MK came up with this script to make reverse lights. I don't know if it works, I haven't tested it.

There are some errors btw (I think he stole something and edited it a bit):
CODE
{$CLEO .cs}

//-------------MAIN---------------
thread 'REVLIGT'
0662: NOP "VEHCILES REVERSING LIGHTS"
0662: NOP "VERSION : 1.0"
0662: NOP "AUTHOR : MICHAEL.KNIGHT1"
0662: NOP "VISIT : WWW.GTAUNITEDGANG.UCOZ.COM"
0AB4: 22@ = var 200
0AB4: 23@ = var 230
0AB4: 24@ = var 210
0AB4: 25@ = var 240
0AB4: 26@ = var 210
0AB4: 27@ = var 255
0AB4: 30@ = var 155
0AF0: 22@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "RADIUS" //IF and SET
0AF0: 23@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS1" //IF and SET
0AF0: 24@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS2" //IF and SET
0AF0: 25@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS3" //IF and SET
0AF0: 26@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS4" //IF and SET
0AF0: 27@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS5" //IF and SET
0AF0: 30@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS6" //IF and SET
0662: NOP "MEMORY FOR ORIGINAL GTA SAN ANDREAS VERSION"
0A8C: write_memory 7282825 size 1 value 88 virtual_protect 1
0A8C: write_memory 7282826 size 4 value 37008 virtual_protect 1
//0AA9: is_game_version_original <-- Don't know what he wanted with this

:REVLIGT_634
wait 0
if and // he forgot and (as usual)
Player.Defined(0)
Player.Controllable($PLAYER_CHAR)
else_jump @REVLIGT_1493
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
if
0AE2: 0@ = random_vehicle_near_point 1@ 2@ 3@ in_radius 22@ find_next 0 pass_wrecked 1 //IF and SET
else_jump @REVLIGT_1493

:REVLIGT_704
if
Car.Defined(0@)
else_jump @REVLIGT_1446
0AB8: get_vehicle 0@ current_gear_to 5@
if
5@ == 0
else_jump @REVLIGT_1446
0A97: 1@ = car 0@ struct
0085: 7@ = 1@ // (int)
0A8E: 6@ = 1@ + 1424 // int
7@ += 34
0A8D: 6@ = read_memory 6@ size 1 virtual_protect 0
if
not 6@ == 0
else_jump @REVLIGT_836
0AA6: call_method 0@ 1@ num_params -53671 pop 88792346
jump @REVLIGT_1446

:REVLIGT_836
0AC7: 11@ = var 8@ offset
0AC7: 12@ = var 7@ offset
0AC7: 13@ = var 9@ offset
0AC7: 14@ = var 27@ offset
0A8D: 7@ = read_memory 7@ size 2 virtual_protect 0
7@ *= 4
7@ += 11120840
0A8C: write_memory 11120212 size 1 value 4 virtual_protect 0
0A8D: 10@ = read_memory 7@ size 4 virtual_protect 0
3@ -= 0.05
0A8C: write_memory 11120212 size 1 value 4 virtual_protect 0
0A8D: 7@ = read_memory 7@ size 4 virtual_protect 0
7@ += 92
0A8C: write_memory 11120212 size 1 value 4 virtual_protect 0
0A8D: 7@ = read_memory 7@ size 4 virtual_protect 0
7@ += 12
0A8C: write_memory 11120212 size 1 value 4 virtual_protect 0
0A8D: 8@ = read_memory 7@ size 4 virtual_protect 0
7@ += 4
0A8C: write_memory 11120212 size 1 value 4 virtual_protect 0
0A8D: 9@ = read_memory 7@ size 4 virtual_protect 0
7@ += 4
0AC7: 11@ = var 8@ offset
0AC7: 12@ = var 7@ offset
0AC7: 13@ = var 9@ offset
0AC7: 14@ = var 27@ offset
9@ += 1
0662: NOP "255 255 255 == [RGBA] WHITE COLOR"
0AA5: call 7325056 21 pop 21 1 0 50.0 0 0.1 0 0 0 0 0 0 0 150.0 0.12 11@ 170 255 255 255 1@ 9@
8@ *= -1.0
0AC7: 11@ = var 8@ offset
0AC7: 12@ = var 7@ offset
0AC7: 13@ = var 9@ offset
0AC7: 14@ = var 27@ offset
9@ += 1
0662: NOP "255 255 255 == [RGBA] WHITE COLOR"
0AA5: call 7325056 21 pop 21 1 0 50.0 0 0.1 0 0 0 0 0 0 0 150.0 0.12 11@ 170 255 255 255 1@ 9@
0407: store_coords_to 12@ 13@ 14@ from_car 0@ with_offset 8@ 9@ 10@
0407: store_coords_to 26@ 27@ 30@ from_car 0@ with_offset 23@ 24@ 25@
0AC7: 11@ = var 8@ offset
0AC7: 12@ = var 7@ offset
0AC7: 13@ = var 9@ offset
0AC7: 14@ = var 27@ offset

:REVLIGT_1446
if or
03C9: car 0@ damaged
Car.Wrecked(0@)
01F3: car 0@ in_air
8AE2: not 0@ = random_vehicle_near_point 28@ 29@ 30@ in_radius 22@ find_next 1 pass_wrecked 1 //IF and SET
else_jump @REVLIGT_704

:REVLIGT_1493
jump @REVLIGT_634


EDIT (ini):
CODE
[MAIN]
radius = 60.0
coords1 = -0.8
coords2 = -2.0
coords3 *= -1.5
coords4 += 2
coords5 -= 6.30
coords6 *= 10.00
coords7 *= -1.2
coords8 += 1

G-Modifications
  • G-Modifications

    G

  • Members
  • Joined: 24 Oct 2011

#4

Posted 30 April 2012 - 06:14 PM

Thank you, but I was thinking to add components or something and then handle them by script, but I don't know how to do that. That looks beter than flares. cool.gif

G-Modifications

_DK
  • _DK

    Call me 'The Bald Guy"

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#5

Posted 30 April 2012 - 06:34 PM

@Bad.boy! this code was made by izerli from liberticity (the worst place in america)

G-Modifications
  • G-Modifications

    G

  • Members
  • Joined: 24 Oct 2011

#6

Posted 30 April 2012 - 08:01 PM

Thank you, but thant was not a answer to my question. colgate.gif

ZAZ
  • ZAZ

    Kernlochbohrer

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

#7

Posted 30 April 2012 - 09:15 PM

make a light object for attaching to car

G-Modifications
  • G-Modifications

    G

  • Members
  • Joined: 24 Oct 2011

#8

Posted 01 May 2012 - 07:30 AM

Yes, indeed. I was trying that, but the problem is that I don't know how to handle that external light object by script. How can I do that and what kind of object sould it be (cutscene or )? I've already made the light objects.

G-Modifcations

Michael_Knight1
  • Michael_Knight1

    Player Hater

  • BUSTED!
  • Joined: 01 May 2012

#9

Posted 01 May 2012 - 11:40 AM

QUOTE (Bad.boy! @ Monday, Apr 30 2012, 17:57)
Our most beloved MK came up with this script to make reverse lights. I don't know if it works, I haven't tested it.

There are some errors btw (I think he stole something and edited it a bit):
CODE
{$CLEO .cs}

//-------------MAIN---------------
thread 'REVLIGT'
0662: NOP "VEHCILES REVERSING LIGHTS"
0662: NOP "VERSION : 1.0"
0662: NOP "AUTHOR : MICHAEL.KNIGHT1"
0662: NOP "VISIT : WWW.GTAUNITEDGANG.UCOZ.COM"
0AB4: 22@ = var 200
0AB4: 23@ = var 230
0AB4: 24@ = var 210
0AB4: 25@ = var 240
0AB4: 26@ = var 210
0AB4: 27@ = var 255
0AB4: 30@ = var 155
0AF0: 22@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "RADIUS" //IF and SET
0AF0: 23@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS1" //IF and SET
0AF0: 24@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS2" //IF and SET
0AF0: 25@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS3" //IF and SET
0AF0: 26@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS4" //IF and SET
0AF0: 27@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS5" //IF and SET
0AF0: 30@ = get_int_from_ini_file "CLEO\VEHICLESREVERSINGLIGHTS.INI" section "MAIN" key "COORDS6" //IF and SET
0662: NOP "MEMORY FOR ORIGINAL GTA SAN ANDREAS VERSION"
0A8C: write_memory 7282825 size 1 value 88 virtual_protect 1
0A8C: write_memory 7282826 size 4 value 37008 virtual_protect 1
//0AA9: is_game_version_original <-- Don't know what he wanted with this

:REVLIGT_634
wait 0
if and // he forgot and (as usual)
Player.Defined(0)
Player.Controllable($PLAYER_CHAR)
else_jump @REVLIGT_1493
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
if
0AE2: 0@ = random_vehicle_near_point 1@ 2@ 3@ in_radius 22@ find_next 0 pass_wrecked 1 //IF and SET
else_jump @REVLIGT_1493

:REVLIGT_704
if
Car.Defined(0@)
else_jump @REVLIGT_1446
0AB8: get_vehicle 0@ current_gear_to 5@
if
5@ == 0
else_jump @REVLIGT_1446
0A97: 1@ = car 0@ struct
0085: 7@ = 1@ // (int)
0A8E: 6@ = 1@ + 1424 // int
7@ += 34
0A8D: 6@ = read_memory 6@ size 1 virtual_protect 0
if
not 6@ == 0
else_jump @REVLIGT_836
0AA6: call_method 0@ 1@ num_params -53671 pop 88792346
jump @REVLIGT_1446

:REVLIGT_836
0AC7: 11@ = var 8@ offset
0AC7: 12@ = var 7@ offset
0AC7: 13@ = var 9@ offset
0AC7: 14@ = var 27@ offset
0A8D: 7@ = read_memory 7@ size 2 virtual_protect 0
7@ *= 4
7@ += 11120840
0A8C: write_memory 11120212 size 1 value 4 virtual_protect 0
0A8D: 10@ = read_memory 7@ size 4 virtual_protect 0
3@ -= 0.05
0A8C: write_memory 11120212 size 1 value 4 virtual_protect 0
0A8D: 7@ = read_memory 7@ size 4 virtual_protect 0
7@ += 92
0A8C: write_memory 11120212 size 1 value 4 virtual_protect 0
0A8D: 7@ = read_memory 7@ size 4 virtual_protect 0
7@ += 12
0A8C: write_memory 11120212 size 1 value 4 virtual_protect 0
0A8D: 8@ = read_memory 7@ size 4 virtual_protect 0
7@ += 4
0A8C: write_memory 11120212 size 1 value 4 virtual_protect 0
0A8D: 9@ = read_memory 7@ size 4 virtual_protect 0
7@ += 4
0AC7: 11@ = var 8@ offset
0AC7: 12@ = var 7@ offset
0AC7: 13@ = var 9@ offset
0AC7: 14@ = var 27@ offset
9@ += 1
0662: NOP "255 255 255 == [RGBA] WHITE COLOR"
0AA5: call 7325056 21 pop 21 1 0 50.0 0 0.1 0 0 0 0 0 0 0 150.0 0.12 11@ 170 255 255 255 1@ 9@
8@ *= -1.0
0AC7: 11@ = var 8@ offset
0AC7: 12@ = var 7@ offset
0AC7: 13@ = var 9@ offset
0AC7: 14@ = var 27@ offset
9@ += 1
0662: NOP "255 255 255 == [RGBA] WHITE COLOR"
0AA5: call 7325056 21 pop 21 1 0 50.0 0 0.1 0 0 0 0 0 0 0 150.0 0.12 11@ 170 255 255 255 1@ 9@
0407: store_coords_to 12@ 13@ 14@ from_car 0@ with_offset 8@ 9@ 10@
0407: store_coords_to 26@ 27@ 30@ from_car 0@ with_offset 23@ 24@ 25@
0AC7: 11@ = var 8@ offset
0AC7: 12@ = var 7@ offset
0AC7: 13@ = var 9@ offset
0AC7: 14@ = var 27@ offset

:REVLIGT_1446
if or
03C9: car 0@ damaged
Car.Wrecked(0@)
01F3: car 0@ in_air
8AE2: not 0@ = random_vehicle_near_point 28@ 29@ 30@ in_radius 22@ find_next 1 pass_wrecked 1 //IF and SET
else_jump @REVLIGT_704

:REVLIGT_1493
jump @REVLIGT_634


EDIT (ini):
CODE
[MAIN]
radius = 60.0
coords1 = -0.8
coords2 = -2.0
coords3 *= -1.5
coords4 += 2
coords5 -= 6.30
coords6 *= 10.00
coords7 *= -1.2
coords8 += 1

Why You Post The cs File ?? Download From Here :
http://www.mediafire...zlgg1j5y9ygx36t

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009

#10

Posted 01 May 2012 - 11:48 AM

QUOTE (Bad.boy! @ Monday, Apr 30 2012, 18:57)
CODE
[MAIN]
radius = 60.0
coords1 = -0.8
coords2 = -2.0
coords3 *= -1.5
coords4 += 2
coords5 -= 6.30
coords6 *= 10.00
coords7 *= -1.2
coords8 += 1

.ini is very simple file, not a programming language where calculations are allowed.
Only static values and assignments are allowed.

*=, += are not allowed.
Only =

Bad.boy!
  • Bad.boy!

    SA modder

  • Members
  • Joined: 20 Jun 2010

#11

Posted 01 May 2012 - 12:02 PM

@MK we are never going to get rid of you, are we? You are posting a link to a mod which you stole and claim to be the author, and the mod contains a crack which isn't allowed either.

@fastman I didn't make that.

ZAZ
  • ZAZ

    Kernlochbohrer

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

#12

Posted 01 May 2012 - 01:08 PM

QUOTE (G-Modifications @ Tuesday, May 1 2012, 07:30)
Yes, indeed. I was trying that, but the problem is that I don't know how to handle that external light object by script.

have you ever written a script?

QUOTE (G-Modifications @ Tuesday, May 1 2012, 07:30)
How can I do that and what kind of object sould it be (cutscene or )? I've already made the light objects.

not cutscene but replace unused objects of multiobj.ide like craigpackage, arrow and such

G-Modifications
  • G-Modifications

    G

  • Members
  • Joined: 24 Oct 2011

#13

Posted 01 May 2012 - 01:14 PM Edited by G-Modifications, 01 May 2012 - 02:25 PM.

QUOTE (ZAZ @ Tuesday, May 1 2012, 15:08)
QUOTE (G-Modifications @ Tuesday, May 1 2012, 07:30)
Yes, indeed. I was trying that, but the problem is that I don't know how to handle that external light object by script.

have you ever written a script?

QUOTE (G-Modifications @ Tuesday, May 1 2012, 07:30)
How can I do that and what kind of object sould it be (cutscene or )? I've already made the light objects.

not cutscene but replace unused objects of multiobj.ide like craigpackage, arrow and such

Thank you, I will try that multiobj.ide stuf. I'll post some pics of it when it's done.

I've written some scripts, but now you said it I think I know what I have to do.

EDIT:

It still keeps crashing, I don't get it work.

G-Modifications

_DK
  • _DK

    Call me 'The Bald Guy"

  • Members
  • Joined: 12 Apr 2009
  • Ukraine

#14

Posted 01 May 2012 - 02:51 PM

SA already has a way to enable/disable lights. It's based on materials' settings (color&diffuse). This system were released in my mod, IMVehLM (breaklights, turnlights, reversinglights and foglights.)

G-Modifications
  • G-Modifications

    G

  • Members
  • Joined: 24 Oct 2011

#15

Posted 01 May 2012 - 03:21 PM

Where can i download this mod? I've seen a video, looks really nice. This it exacly what I wanted.

G-Modifications




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users