Quantcast

Jump to content

» «
Photo

Turn indicators [CLEO4/SA/REL]

50 replies to this topic
Den_spb
  • Den_spb

    Player Hater

  • Members
  • Joined: 12 Jun 2009

#1

Posted 08 January 2011 - 01:40 AM Edited by Den_spb, 08 January 2012 - 01:48 PM.

Description:
This script allows to use turn indicators while driving automobile or motobike. Coronas are created at positions of headlights and back lights of vehicle, which are calculated automatically. So, you can use this script with all models of automobiles and motobikes, without additional files. If trailer is attached to automobile with enabled turn indicators, it will have enabled turn indicators too.

Version 1.1. Indicators work after player exit car until enter another car.
Version 2.0. AI-drivers can use indicators, no CJ only.
Version 2.1. Some bugs were fixed.

Installation:
1.Download and install CLEO4 library from cleo.sannybuilder.com.
2.Put file turn_indicators.cs to cleo folder.

How to use:
Z - enable left indicators, C - enable right indicators, X - enable all indicators. Press this buttons again to disable indicators (in v.2 disable indicators by Shift button).

Script was made for game version 1.0 US. Work with other versions of game is not guaranteed.

uNi
  • uNi

    instantrum

  • Moderator
  • Joined: 14 May 2004
  • None

#2

Posted 08 January 2011 - 02:02 AM

Both files and screens are now up at GTAG.

riquenunes
  • riquenunes

    Soldier

  • Members
  • Joined: 28 Apr 2008
  • Brazil

#3

Posted 08 January 2011 - 05:49 AM

Is it possible to make them blink? Great mod BTW. biggrin.gif

Guns*R-Us
  • Guns*R-Us

    Why So Serious ?

  • Members
  • Joined: 04 Apr 2009
  • None

#4

Posted 08 January 2011 - 12:05 PM

is it work with modded vehicles ? smile.gif

Den_spb
  • Den_spb

    Player Hater

  • Members
  • Joined: 12 Jun 2009

#5

Posted 08 January 2011 - 01:44 PM

QUOTE
Is it possible to make them blink? Great mod BTW.
Lights must blink. If blinking isn't visible, you can enlarge pause between flashes:
CODE
       if
           32@ > 1000 // duration of flash + pause between flashes (ms)
       then
           32@ = 0
       end
       if
           32@ < 500 // duration of flash in ms
       then
QUOTE
is it work with modded vehicles ?
It works with all vehicles.

at72
  • at72

    Square Civilian

  • Members
  • Joined: 14 Jan 2009

#6

Posted 08 January 2011 - 03:56 PM

Good one! Works pretty well, although indicators mostly are placed in the wrong position - but that's not your fault.
Now it would be cool to see other cars using indicators in traffic - and maybe when both indicators together would still continue flickering when you leave the car.
Nice job, really well done - thanks!

Den_spb
  • Den_spb

    Player Hater

  • Members
  • Joined: 12 Jun 2009

#7

Posted 08 January 2011 - 04:47 PM

Thanks for good opinions.
QUOTE
Now it would be cool to see other cars using indicators in traffic - and maybe when both indicators together would still continue flickering when you leave the car.
Maybe, I'll do it later.

TheD199434
  • TheD199434

    Street Cat

  • Members
  • Joined: 10 Jun 2010

#8

Posted 08 January 2011 - 04:57 PM

Nice man i gonna download it now. But i seen such mod over at gtainside once, very old mod, but as i know, very bugged for sure, lol.

cookie.gif cookie.gif icon14.gif smile.gif

at72
  • at72

    Square Civilian

  • Members
  • Joined: 14 Jan 2009

#9

Posted 22 January 2011 - 01:51 AM

Thanks a lot for making the new version! It's great, I'll keep this CLEO in forever! icon14.gif

Ghost glendale fan 4 live
  • Ghost glendale fan 4 live

    Libby-Ketchup city!

  • BUSTED!
  • Joined: 20 Jul 2007

#10

Posted 01 February 2011 - 12:43 AM

Thanks very very much man biggrin.gif cookie.gif cookie.gif cookie.gif

Rob.Zombie
  • Rob.Zombie

    Sgt.Kanyo

  • Members
  • Joined: 22 Mar 2007

#11

Posted 01 February 2011 - 10:54 AM

Wow very nice biggrin.gif I wish we could have this in GTA IV.

Neova
  • Neova

    Snitch

  • Members
  • Joined: 10 Nov 2006

#12

Posted 01 February 2011 - 02:54 PM

Great job but can you make it so the AI cars also use the indicators?

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#13

Posted 01 March 2011 - 12:37 AM

QUOTE (Neova @ Feb 1 2011, 14:54)
Great job but can you make it so the AI cars also use the indicators?

+1 for this.

Also 'white' reversing lights too ? And a 'beep' if its a truck or heavy vehicle reversing ?

Den_spb
  • Den_spb

    Player Hater

  • Members
  • Joined: 12 Jun 2009

#14

Posted 30 October 2011 - 11:10 PM

V 2.0 was loaded to gtagarage.com.
Now turn signals can be use at AI-cars.

Kmeto 2
  • Kmeto 2

    Mark Chump

  • Members
  • Joined: 21 Aug 2007

#15

Posted 01 November 2011 - 10:25 AM

Very nice mod, thank you for this one tounge.gif

Darecki
  • Darecki

    a.k.a LinkinDark

  • Members
  • Joined: 21 Oct 2006

#16

Posted 01 November 2011 - 01:18 PM Edited by Darecki, 01 November 2011 - 01:21 PM.

That's what I was waiting for! Thanks smile.gif Hope that v2 will be approved soon.

I understand that it is possible to change the position of indicators in the script?

Den_spb
  • Den_spb

    Player Hater

  • Members
  • Joined: 12 Jun 2009

#17

Posted 01 November 2011 - 01:34 PM

Kmeto 2, thanks for opinion.
Darecki, indicators are created at points of headlights and tail lights placing - as in previous versions.

Darecki
  • Darecki

    a.k.a LinkinDark

  • Members
  • Joined: 21 Oct 2006

#18

Posted 01 November 2011 - 08:23 PM

Umm, so there is no chance to make them for example +2 to the outside of car or something? I think it will look better as indicators are mostly at the edges. Maybe this can be added in new version, what do you think? smile.gif

Sonny R
  • Sonny R

    Crackhead

  • Members
  • Joined: 29 Oct 2010
  • None

#19

Posted 06 November 2011 - 10:25 AM

this mod is incredible! do you plan to add the sound effects? also, could you please send me a modified script with changed keys? i need left turn to right ctrl and right turn to left alt! thank you.

Den_spb
  • Den_spb

    Player Hater

  • Members
  • Joined: 12 Jun 2009

#20

Posted 06 November 2011 - 06:36 PM

Sonny Red, thanks for opinion. I don't plan add sounds now.
How to change buttons:
1.Put file turn_indicators2.txt into cleo folder
2.Open txt-file by Sanny Builder (File-Open)
3.Change numbers of buttons (90, 88, 67) here
CODE
            if
                 0AB0:  key_pressed 90 // Z
             then
                 0_StatusOfPlayerCar = 1_Left  
             else
                 if
                     0AB0:  key_pressed 88 // X
                 then
                     0_StatusOfPlayerCar = 1_Both  
                 else
                     if
                         0AB0:  key_pressed 67 // C
                     then
                         0_StatusOfPlayerCar = 1_Right
                     else
                         if
                             0AB0:  key_pressed 16 // Shift
                         then
                             0_StatusOfPlayerCar = 0
                         end  
                     end                     
                 end         
             end
Numbers of buttons are in SB Help: Help - Contents - CLEO3 - Virtual key codes 0AB0, column Decimal
4.Compile script after editing (Run-Compile).

Darecki, you can change offsets of lights yourself. For example, increase standard X offsets to 1.0 and Z offsets to 0.5:
CODE
:Get_lights_coords
0A8E: 0_Adress = 0_VehicleStruct + 0x22 // int
0A8D: 0_Adress = read_memory 0_Adress size 2 virtual_protect 0 //model index
0_Adress *= 4
0_Adress += 0xA9B0C8
0A8D: 0_Adress = read_memory 0_Adress size 4 virtual_protect 0 //CModel
0_Adress += 0x5C                                        
0A8D: 0_Adress = read_memory 0_Adress size 4 virtual_protect 0 //vehicle struct
0A8D: 0_FrontLightX = read_memory 0_Adress size 4 virtual_protect 0 //x offset
0_Adress += 4
0A8D: 0_FrontLightY = read_memory 0_Adress size 4 virtual_protect 0 //y offset
0_Adress += 4
0A8D: 0_FrontLightZ = read_memory 0_Adress size 4 virtual_protect 0 //z offset
0_Adress += 4
0A8D: 0_BackLightX = read_memory 0_Adress size 4 virtual_protect 0 //x offset
0_Adress += 4
0A8D: 0_BackLightY = read_memory 0_Adress size 4 virtual_protect 0 //y offset
0_Adress += 4
0A8D: 0_BackLightZ = read_memory 0_Adress size 4 virtual_protect 0 //z offset
if
   0_FrontLightX == 0.0
then
   0_FrontLightX = 0.15
end
if
   0_BackLightX == 0.0
then
   0_BackLightX = 0.15
end
0_FrontLightX += 1.0 // NEW COMMANDS HERE
0_BackLightX += 1.0
0_FrontLightZ += 0.5
0_BackLightZ += 0.5
return
But I think that the variant with standard offsets is the best variant.

Darecki
  • Darecki

    a.k.a LinkinDark

  • Members
  • Joined: 21 Oct 2006

#21

Posted 06 November 2011 - 08:25 PM

For now I can say that new version crashes my SA.. confused.gif When I enter a car or when any vehicle will try to appear (when I approach a road)...

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#22

Posted 07 November 2011 - 09:24 AM

It works for me; but sometimes it crashes also. I removed San Andreas Limit Adjuster, and used StreamMemFix instead, and didn't have a crash for over 10 mins ..

But..

Sometimes, they don't indicate when turning (I guess thats good, not all drivers do LOL) <-- These guys need to be chased

I can see the indicator texture/particle through the car sometimes ..

user posted image

What particle is the effect based on ? It's quite large on my screen. Maybe make its own particle in particle.txd and make it smaller? So everyone can have the perfect size, but not effect any other particles in the game?


Den_spb
  • Den_spb

    Player Hater

  • Members
  • Joined: 12 Jun 2009

#23

Posted 07 November 2011 - 01:33 PM

QUOTE
but sometimes it crashes also.
Script must work without crashes with gta_sa.exe 1.0 US version and v4.1.1.30 CLEO4 version. If you have another versions of game or cleo, I don't guarantee correct work of script.
If you have right versions of game and cleo and game is still crashing, install plugin ScmLog from cleo.sannybuilder.com. File scmlog.txt will be created after crashing - send it me.

QUOTE
Sometimes, they don't indicate when turning
Indicators enable before begin of turning usually. If indicators enable during turning or don't enable, that means low speed of script working (reasons: very many cars in traffic, many "heavy" modifications were installed, low-power computer...).

user posted image

QUOTE
I can see the indicator texture/particle through the car sometimes ..
No you only. May be, it will be fixed later.

QUOTE
Maybe make its own particle in particle.txd and make it smaller?
CODE
0AA5: 0x6FC580 21 21 1 0 0x41700000 0 0x3FC00000 0 0 0 0 0 attach_corona_flare 0 type 0 0x43160000 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_vehicle_struct 0_VehicleStruct unical_number 0_UnicalNumberOfCorona

Here 0.3 is radius of corona. You can change it yourself.

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#24

Posted 07 November 2011 - 06:42 PM

Ok, thanks for the help mate. Will play with the 0.3 value tonight.

Is it based on coronastar from particle.txd? What one do you use? As you can see, my indicator looks nothing like yours .. moto_whistle.gif

Den_spb
  • Den_spb

    Player Hater

  • Members
  • Joined: 12 Jun 2009

#25

Posted 07 November 2011 - 08:50 PM

QUOTE
Is it based on coronastar from particle.txd?

Yes.
My coronas different from standard coronas because I installed other effects.

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#26

Posted 08 November 2011 - 02:13 AM

Oh ok; thanks for that. I'm using Overdose Effect 1.4 at the moment. What are you using?

Den_spb
  • Den_spb

    Player Hater

  • Members
  • Joined: 12 Jun 2009

#27

Posted 08 November 2011 - 09:56 AM

I use "Effects by NS". Link: http://webfile.ru/5653290
Picture:
user posted image

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#28

Posted 09 November 2011 - 07:23 AM

Ok, thanks for the link; will try it out ..

One more question; what timecyc.dat do you use ^^

Den_spb
  • Den_spb

    Player Hater

  • Members
  • Joined: 12 Jun 2009

#29

Posted 09 November 2011 - 09:49 AM

QUOTE
One more question; what timecyc.dat do you use

Standard.

Gramps
  • Gramps

    ★★★★★

  • Feroci
  • Joined: 23 May 2008
  • New-Zealand

#30

Posted 11 November 2011 - 10:42 PM

Ok thanks for that ^ ^

I found another bug; don't know if this is your scripts fault or not ..

But I have the Packer script, that has up to four cars on the Packer; and those vehicles have there indicators going as well lol colgate.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users