The online racing simulator
Police/Warning/Hazard Lights
4 lights (2 blue/2 red) that show on top of screen, and blink alternately, in pairs
blue blue/red red
red red/blue blue
blue blue/red red
.....

I use them so that they come on with spinning detection, but could easily be used for anything, e.g. exiting pits mid race, during safety car deployment, cruise servers, etc.


If adding to your existing LFSLapper.lpr file, you must have the texteditor you use (NOT Notepad) set for UTF-8 text format.

Best to use PSPad with Tim[NL] special pspad ini addon - search for it.

If you find the lights don't work as discs, then substitute equal (=) signs in their place - looks quite modern really. Don't change layout or sizes.
Attached images
LFS Blinking Lights.PNG
Attached files
Blinking Warning Lights.txt - 522 B - 548 views
#2 - Krayy
Very nice. I think I'll display them when you enter pits with a warning about the speed limit, then remove when pits left.
Quote from Krayy :Very nice. I think I'll display them when you enter pits with a warning about the speed limit, then remove when pits left.

Maybe change the colours?

Flashing Amber (yellow) going into pits (as a hazard warning), and blue when exiting. Bit like F1 where they have blue light at end of pit lane - extract from regulations "At any time, a stationary light blue flag (or, as is now more common, a blue light) may be shown to a driver at the pit lane exit to warn them that cars are approaching on the track".

As an aside, as I lack the necessary programming expertise, but you don't (:nod, any chance you could develop some sort of light system whereby if all going well on track, light(s) show blank or green, but if there's an accident in a section of track, then drivers in that section and in preceding section get yellow light(s)?

Would be a good .lpr add-on.

I've seen the yellow lights warning of problems when watching F1, but can't say i've noticed lights when not yellow. Are they off (dark/black) or green?

I've been trying to do it with my yellow flag that I use for spinning detection, but getting nowhere.

I'd prefer to use sort of traffic light arrangements for everything (track and pit) to try keep in line with a F1 theme, as I see the hazard lights as more suitable to show a safety car was deployed. The (=) equal signs in place of circles look cool for that.

Or alternating circles and lines so you could have;

OO OO
== OO
OO ==
== OO
OO ==

Be aware that the flashing "lights" can easily become out of sync if not all same colour. Seems to be same problem as the countdown timer, where some numbers/seconds are lost.
Quote from sinanju :Maybe change the colours?

Flashing Amber (yellow) going into pits (as a hazard warning), and blue when exiting. Bit like F1 where they have blue light at end of pit lane - extract from regulations "At any time, a stationary light blue flag (or, as is now more common, a blue light) may be shown to a driver at the pit lane exit to warn them that cars are approaching on the track".

As an aside, as I lack the necessary programming expertise, but you don't (:nod, any chance you could develop some sort of light system whereby if all going well on track, light(s) show blank or green, but if there's an accident in a section of track, then drivers in that section and in preceding section get yellow light(s)?

Would be a good .lpr add-on.

I've seen the yellow lights warning of problems when watching F1, but can't say i've noticed lights when not yellow. Are they off (dark/black) or green?

I've been trying to do it with my yellow flag that I use for spinning detection, but getting nowhere.

I'd prefer to use sort of traffic light arrangements for everything (track and pit) to try keep in line with a F1 theme, as I see the hazard lights as more suitable to show a safety car was deployed. The (=) equal signs in place of circles look cool for that.

Or alternating circles and lines so you could have;

OO OO
== OO
OO ==
== OO
OO ==

Be aware that the flashing "lights" can easily become out of sync if not all same colour. Seems to be same problem as the countdown timer, where some numbers/seconds are lost.

you could have it as a delayed command after 15 seconds it opens the buttons with the same id that are balck instead of blue and red...
where do i put it in the lapper.lpr anywhere
Quote from gazastrike :where do i put it in the lapper.lpr anywhere

Open your LFSLapper.lpr file and search for CASE

The first one is CASE "!node":

Few lines down you will see a line with BREAK; followed by another CASE command.

Put the whole of the code in between a BREAK and a CASE.

Doesn't matter which Case commands you put it between.

E.g.
CASE "!spb":
showSpb();
BREAK;

[COLOR=Navy]CASE "!blink": # blinking warning/Police lights (Blue/Red)
openPrivButton( "blink_bg",80,17,40,19,1,20,32," ");
openPrivButton( "blink_bga",80,17,40,19,1,20,32," ");
openPrivButton( "blink1",60,0,50,50,1,20,0,"^1•%at%^4•" );
openPrivButton( "blink1a",70,0,50,50,1,20,0,"^1•%at%^4•" );
openPrivButton( "blink2",80,0,50,50,1,20,0,"^4•%at%^1•" );
openPrivButton( "blink2a",90,0,50,50,1,20,0,"^4•%at%^1•" );
BREAK;[/COLOR]

CASE "!hand":
showHand( $argv );
BREAK;

Make sure you open your text editor, and save, in UTF-8 code!

Can even be done in Notepad.


HOWEVER!

Above way will only work if you open chat window and type !blink

You could use it in different ways, one of which could be if someone spins.

Event AngleVelocityAction($userName)
cmdLFS( "/msg ^1Danger! ^8" . $Nickname . " ^2lost control!" );
openGlobalButton( "blink_bg",80,17,40,19,1,20,32," ");
open
GlobalButton( "blink_bga",80,17,40,19,1,20,32," ");
open
GlobalButton( "blink1",60,0,50,50,1,20,0,"^1•%at%^4•" );
open
GlobalButton( "blink1a",70,0,50,50,1,20,0,"^1•%at%^4•" );
open
GlobalButton( "blink2",80,0,50,50,1,20,0,"^4•%at%^1•" );
open
GlobalButton( "blink2a",90,0,50,50,1,20,0,"^4•%at%^1•" );
EndEvent

This will get lights blinking for 20 seconds.

Note that the CASE code changed slightly (from private to global buttons) so that everyone warned when someone spins.

To test it, change your $MinAngleVelocity= to a small angle, then crash.

Or you could use it when a driver enters the pit lane.


Event OnEnterPitLane( $userName,$reason ) # Player event
openPrivButton( "blink_bg",80,17,40,19,1,-1,32," ");
openPrivButton( "blink_bga",80,17,40,19,1,-1,32," ");
openPrivButton( "blink1",60,0,50,50,1,-1,0,"^1•%at%^4•" );
openPrivButton( "blink1a",70,0,50,50,1,-1,0,"^1•%at%^4•" );
openPrivButton( "blink2",80,0,50,50,1,-1,0,"^4•%at%^1•" );
openPrivButton( "blink2a",90,0,50,50,1,-1,0,"^4•%at%^1•" );

EndEvent

In above example, lights will always blink while you're in pitlane.

To close them, close buttons when you leave pits;

Event OnExitPitLane( $userName ) # Player event
closePrivButton("blink_bg&blinkbga&blink1&blink1a&blink2&blink2a" );
EndEvent

Or use them anywhere else you like, in between a SUB-ENDSUB or EVENT-ENDEVENT.

If you want to change colours, the ^1 is red, and ^4 is blue. Try any numbers between ^0 and ^7 (or remove the ^ and number to have them a light grey).

Good luck!
Attached images
UTF8.PNG
Just an FYI, the color of the light means different things in different places of the world.

Where I am, the only color that has the authority to pull people over is a forward facing red light. The color blue is used both in the front and in the back as it's brighter then red, and is used as a warning beacon. Yellow is also used in the front and in the back, and is not a restricted color, that is used in the front as a color separator between the red and the blue, where as in the back it's used for the directional arrows telling the traffic what why to move around the police stop. (We call police stop's VTL as it's the Vehicle and Traffic Law.). The color green is used to denote ambulances, or command post status of a car. White is also used again to breakup the colors and move people away from the scene.

Most light bars around here are now Wheelen LEDs, and are colorless when they are off, but have a very right color when they are on. The best config I have seen thus far in the front, goes like this.

Where * is LEDs.
Where - is Take Down Lights (Lamps that take up both top & bottom slot on light deck).
Where = is LED Arrow Lights (That flash with the top LED, when not in arrow stick mode).

Front:
*-***-*
*-***-*


Rear
*******
<=====>

FGED GREDG RDFGDR GSFDG