The online racing simulator
Drag - where's the logic?
I've been trying to code a Drag race system as an additional bit of fun for the City Centre layout I currently have running on my server, and have got most of it done, but am totally lost on the logic of how to put on the penalty light if a driver jumps the green start light.

See attached Zip file for drag.lpr file and the layout I've been using to test with.

If you don't know how drag racing works, then little bit of an explanation;
Quote :
The start lights (usually referred to as christmas lights) usually consist of;

2 Yellow Pre-Stage lights just before start line (light should be Amber)

2 Yellow Stage lights just at start line (light should be Amber)

Below the staging lights are three large Yellow lights (lights should be Amber), a green light, and a red light.

So to start, driver in one lane, drives up to start line, and activates top row of 2 (Pre-Stage) lights - this is a warning to driver that they're almost at the start line.

When driver drives little bit further (to start line), the 2nd row of 2 (Stage) lights illuminate.

When a driver are 'staged', the tree is activated to start the race, which causes the three large yellow lights to illuminate, followed by the green light.

The yellow lights illuminate in sequence from top to bottom, followed later by the green light.

If the front tires leaves from a stage beam (stage and pre-stage lights both turned off) before the green light illuminates,
the red light for that driver's lane illuminates instead, indicating disqualification (unless a more serious violation occurs).
Once a driver commits a red-light foul (also known as redlighting), the other driver can also commit a foul start by leaving the line too early but still win, having left later.

Notes on my LFSLapper drag.lpr:
Quote :

!drag turns drag system on
!dragoff turns it off

No Amber text available in LFS InSim, so Yellow used instead for Pre-Stage, stage and 'countdown' lights.

Normally both drivers should activate stage lights for sequence to start, but this has been coded to happen when driver on left passes Stage line.

Normal light sequence is either 0.4 seconds or 0.5 seconds between ambers and green (depending on type of competition), but partial seconds are not available in LFSLapper, so 2 different random times used instead; one for after Stage lights go on, to when 3 yellow light sequence starts, and other for sequence of one light to another, and then green.

Lights are redrawn at speed hump; 2 reasons
saves having to do !dragoff / !drag once a race has finished
more importantly, sometimes when race finished, some of the lights just disappear from screen.

Event 'triggers' are usually via zone (RegisterZoneAction) locations, so GlobalVar $DragMode is used to put drag system off and on, and if on, then sub-routines called by RegisterZoneAction will run.

Request:
========

Need logical system so that if either driver jumps the lights (before the green), then the red should go on, and no race times, etc. recorded

Thought of using something like

$InstantSpeed = GetCurrentPlayerVar( "InstantSpeed" );
IF ($InstantSpeed >0)
THEN

... redlight penalty, etc

ENDIF

but that will not work with the 3 countdown yellow lights (after Stage lights, but before Green) as problems because I can't use $userName in the Sub name.

And I can't use individual countdown's for each player as they're likely to be, or go out of sync with each other.

For giving a penalty (red light) when someone jumps the start, I've been trying various GlobalVar's like $penalty="on";.

However, no matter how I set things, I can't get the logic right for things to work properly if no red light at all or if someone jumps the start and causes red light.

The red light needs to come on if someone crosses the start line before the green light comes on.

Can anyone help?

I suspect that it's either going to be so simple iI'll cringe when someone points it out, or to get things working properly, I need 2 GlobalVars (maybe a Set/Unset and Off/On)?
Attached files
LFSLapper Drag System_Test.zip - 6 KB - 1274 views
Added video to YouTube HERE to show drag system in action.
look at the source code of ISRM drag mod if you want. I had attached it in the last post of the thread.

Can you make this for Demo BL1 without layout ?
Quote from andonow :look at the source code of ISRM drag mod if you want. I had attached it in the last post of the thread

Wouldn't know what source code was if it poked me in the ribs with a sharp stick!

Luckily, with LFSLapper, I don't have to go thru that painful experience.

Quote from andonow :Can you make this for Demo BL1 without layout ?

Possibly, but as the majority of the start of the long straight at Blackwood is on a downwards slope, you'd have to start just past the entrance/exit to the AutoX track on the right hand side, and just before motorway sign on left (there's a feint white line on track, split into 3 sections.

The more obvious start positions close to the exit of the chicane, where tarmac changes colour, can't be used as if you stop before change of tarmac colour, you'd have to put the brake on or you would roll forward.

So moving start further from chicane would mean 400m drag race, as 800m would mean person on right of track gets slight advantage as track kinks right when it goes under bridge.
I mean 1/4 mile (402m) drag race on BL1 straight, like ISRM for Z28
#6 - Krayy
Well the bones of the script look okay.

The problem is that when using an Autcross layout, it's a pain in the butt to use zones and nodes to determine where you are, as on a track you have a defined area to be in.

Quick definition time...Node is a point on the track, at location X:Y. A Zone is an area around a Node determined by an X:Y co-ordinate and a distance. The distance creates a circle around the Node so you can find your distance from it.

Now as far as I know, drag lanes and start boxes are square, so if we create a Zone which is a circle, how can we be sure the person enters it?

I can say that you are on the right track. i would start with creating a left lan and right lane zone that has a radius of say 5, so make the x:y co-ords out in the lane with the outside of the circle touching the start line. Then you could create an event to see if that person eneters the box before your drag_penalty global has been cleared (BTW, use TRUE and FALSE, not "one" and "off" as doing a numeric compare is faster than a string one).

Just experiment that and see where you get. Failing that, we might see about creating new Lapper code to handle Zones as Boxes, like RegisterBoxZoneEvent.
Quote from Krayy :The problem is that when using an Autcross layout, it's a pain in the butt to use zones and nodes to determine where you are, as on a track you have a defined area to be in.

Yes, I worked out that I needed at least 8 zones per driver in drag, but once you've worked out zones for one driver, you just need to get start and end zones for other drivers, and as long as the x co-ord isn't different, the y co-ord should be the same.

Quote from Krayy :Quick definition time...Node is a point on the track, at location X:Y. A Zone is an area around a Node determined by an X:Y co-ordinate and a distance. The distance creates a circle around the Node so you can find your distance from it.

Most of that I was ok with, although didn't realise that a zone was a circle; I thought it was 1m x 1m squares.

Quote from Krayy :Now as far as I know, drag lanes and start boxes are square, so if we create a Zone which is a circle, how can we be sure the person enters it?

That's why there are Pre-Stage and Stage lights.

Pre-stage come on (in my code) about 8m before start line, with Stage lines coming on couple of meters before start line.

This should give a driver enough room to stop when the Stage lights (2nd row from top) come on. Depending on the drivers ability, they may be able to get quite close to the start line, maybe giving them a small time advantage, although a driver further from the lights will have an acceleration advantage.

This is because the timer doesn't start from when the lights go green, but from when the driver goes over the 1st Split line.

Couldn't think of anything to use within lapper that could give split second timing except Splits.

Quote from Krayy :I would start with creating a left lane and right lane zone that has a radius of say 5, so make the x:y co-ords out in the lane with the outside of the circle touching the start line. Then you could create an event to see if that person enters the box before your drag_penalty global has been cleared (BTW, use TRUE and FALSE, not "one" and "off" as doing a numeric compare is faster than a string one).

I sort of have that, in that I have set a penalty line (e.g. SE_PenaltyLineLeft), which is set 1 metre past the start line, so if you cross the start line, you enter the 1m zone of the penalty line.

Then I ran into the problems of getting red light on if you entered this penalty zone before green light went on; the green light being the trigger for clearing the drag-penalty global.

Maybe it was the way I was trying to use one IF statement within another?

I have a $DragMode == "Drag" for each event that's called by a RegisterZoneAction (don't want the script sub-routines working - showing the lights - if the drag system has not been enabled!).

e.g.

<?php 
    RegisterZoneAction
"Pre Stage Left","AU1" 27,-632SE_PreStageLeft,"" );
?>


<?php 
Sub SE_PreStageLeft
($userName)
        
$NickName GetCurrentPlayerVar("NickName");
    IF ( 
$DragMode == "Drag" )
    
THEN
    
.... draw Pre-stage lights for driver on left
    
ENDIF   
EndSub
?>


But then if I did something like


<?php 
Sub SE_PreStageLeft
($userName)
        
$NickName GetCurrentPlayerVar("NickName");
    IF ( 
$DragMode == "Drag" )
    
THEN
        
IF ( $drag_penalty == "off" )    
     
THEN
    
.... draw Pre-stage lights for driver on left
     
ELSE
    .... 
go to penalty sub-routine for driver on leftwhich will
           
clear all lights for driver on left
           
draw Penalty light for driver on left
        
ENDIF
    ENDIF   
EndSub
?>


But couldn't seem to get things working.

This penalty sub-routine could be called if Pre-stage, Stage, Countdown lights 1 to 3 on, then disabled on the green.
#8 - Krayy
I'm thinking that we just write a lapper module that displays a location box that gives you your x, y co-ords along with the current Node and Zone (if any) and updates every new Node. Define some Zones and Nodes and see how it bahaves to create a virtual map of the course
What`s up with the drag lapper? Is there any progress? I tried to make it for BL1 Demo (without using layouts) but I can`t... If you have freetime to do it, I`ll appreciate it Greetings!
Not had a lot of time to work on it over last couple of weeks.

I'm still having problems with getting red light penalty to work if someone jumps the start.
Make global variable rip (race in progress).
Set it to 0.
If someone moves and it is in racers array and rip = 0 - kick.
When countdown reaches green light or pre-green set rip=1.

I can explain it you with algoritm if you don't understand (my english is bad)
Quote from misiek08 :Make global variable rip (race in progress).
Set it to 0.
If someone moves and it is in racers array and rip = 0 - kick.
When countdown reaches green light or pre-green set rip=1.

I can explain it you with algoritm if you don't understand (my english is bad)

What I have so far is;

Xmas Tree Light Sequence (from top):
-------------------------------------
Pre-stage
Stage
Countdown yellow 1
Countdown yellow 2
Countdown yellow 3
Green
Red

Zones triggers set:
------------------
Redraw lights (at speed hump - sometimes some lights disappear after a race, etc )
Pre-stage (yellow line)
Stage (red line)
Penalty zone (purple area immediately after start line)


My logic;

Global penalty set to FALSE (actual lapper code is GlobalVar $drag_penalty; $drag_penalty = "FALSE";)

When you initialise Drag system (!drag command), penalty set to TRUE

Cross Pre-stage line
IF TRUE, then continue light sequence
IF FALSE, give penalty
Cross Stage line
IF TRUE, then continue light sequence
IF FALSE, give penalty
Countdown starts (light 1)
IF TRUE, then continue light sequence
IF FALSE, give penalty
Countdown starts (light 2)
IF TRUE, then continue light sequence
IF FALSE, give penalty
Countdown starts (light 3)
IF TRUE, then continue light sequence
IF FALSE, give penalty
Light goes Green
set penalty to FALSE

Entering Penalty Zone
IF TRUE, then Red light
IF FALSE, then do nothing
(I could have TRUE/FALSE other way round, but it's really half a dozen of one or two threes of the other - in other words, penalty set until green light goes on, when penalty becomes unset).

However, sequence not working properly because when I jump the lights, the sequence just carries on.

Haven't done much work in last couple of weeks to find out why, as I've been on holiday, and sometimes only getting few minutes on computer every couple of days or so.
Attached images
Drag Christmas Tree Lights.jpg
Any updates? And version without layout for BL1 demo? )
Where do i put the lpr file?
What's up with the drag lapper?
Hit problems with it working properly - especially the penalty bit, and eventually gave up, as it's not something I use anyway.

The code is HERE.

It's an add-on for LFSLapper, so you'll need that installed too.
Your's looks - and works - better than mine!

Kudos.

(PS If you jump the start, it's a "penalty")
ye i know i just realising it after uploading.
was to lazy to change it.
Sinanju, I hosted a demo server with your drag.lpr, but it is not working properly, left player got to forwarder than right to be "staged", and false start didn't work. When we finish, time didn't work (even with 2-3 laps of the circuit) and in the finish box have red title, and only left player. Can you fix it? Thanks.
Attached images
stage.jpg
finish.jpg
Sinanju, do you think about any updates or official releases? Thanks.
Sinanju, I have made your penalty detection, look at the code:

GlobalVar $drag_penalty;
$drag_penalty = 1;

Sub SE_DragStart($KeyFlags) # A Sinanju Event (opens christmas light cluster)
IF ( $DragMode == "Drag" )
THEN
$drag_penalty = 2;
closeButtonRegex (GetCurrentPlayerVar("UserName"), "drag_*"); # closes Drag system if running, then redraws lights (but not results board)
closePrivButton( "hud_message");
openGlobalButton( "drag_info_text",75,1,50,5,5,5,0,"^7Light sequence reset"); # supplemental message

# Left side
openGlobalButton( "drag_left_backing",$DRorigL+5,$DRorigT,$DRWidth+2,$DRHeight+52,$DRspacing,$DRtime,16,""); # Light underlay
openGlobalButton( "drag_left_back",$DRorigL+6,$DRorigT+1,$DRWidth,$DRHeight+50,$DRspacing,$DRtime,32,""); # Left back lightboard
openGlobalButton( "drag_left_psl1",$DRorigL+1,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); # Pre-stage lights
openGlobalButton( "drag_left_psl2",$DRorigL+10,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•");
openGlobalButton( "drag_left_sl1",$DRorigL+1,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); # Stage lights
openGlobalButton( "drag_left_sl2",$DRorigL+10,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•");
openGlobalButton( "drag_left_cdyt",$DRorigL,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow top
openGlobalButton( "drag_left_cdym",$DRorigL,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow middle
openGlobalButton( "drag_left_cdyb",$DRorigL,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow bottom
openGlobalButton( "drag_left_st",$DRorigL,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^6•"); # Start Light
openGlobalButton( "drag_left_rp",$DRorigL,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^8•"); # Red Penalty Light

# Right side
openGlobalButton( "drag_right_backing",$DRorigL+14,$DRorigT,$DRWidth+2,$DRHeight+52,$DRspacing,$DRtime,16,""); # Light underlay
openGlobalButton( "drag_right_back",$DRorigL+15,$DRorigT+1,$DRWidth,$DRHeight+50,$DRspacing,$DRtime,32,""); # Right back lightboard
openGlobalButton( "drag_right_psl1",$DRorigL+3,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_psl2",$DRorigL+12,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_rights_sl1",$DRorigL+3,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_rights_sl2",$DRorigL+12,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdyt",$DRorigL+8,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdym",$DRorigL+8,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdyb",$DRorigL+8,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_st",$DRorigL+8,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^6 •");
openGlobalButton( "drag_right_rp",$DRorigL+8,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^8 •");
ELSE
ENDIF
EndSub


Sub SE_PreStageLeft($userName)
$NickName = GetCurrentPlayerVar("NickName");
IF ( $DragMode == "Drag" )
THEN
$drag_penalty = 1;
closePrivButton( "hud_message");
closeGlobalButton ("drag_info_text&drag_left_psl1&drag_right_psl1");
openGlobalButton( "drag_info_text",75,1,50,5,5,5,0,"^7Pre-stage set");
openGlobalButton( "drag_left_driver",45,1,50,6,6,$DRtime,128,$NickName); # Driver on Left
openGlobalButton( "drag_left_psl1",$DRorigL+1,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3•"); # shows Pre-stage lights for driver on left
openGlobalButton( "drag_right_psl1",$DRorigL+3,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3 •");
ENDIF
EndSub


Sub SE_PreStageRight($userName)
$r_NickName = GetCurrentPlayerVar("NickName");
IF ( $DragMode == "Drag" )
THEN
$drag_penalty = 1;
closePrivButton( "hud_message");
closeGlobalButton ("drag_left_psl2&drag_right_psl2");
openGlobalButton( "drag_driverV",95,1,10,7,6,$DRtime,0,"^1VS");
openGlobalButton( "drag_right_driver",105,1,50,6,6,$DRtime,64,$r_NickName); # Driver on Right
openGlobalButton( "drag_left_psl2",$DRorigL+10,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3•"); # shows Pre-stage lights for driver on right
openGlobalButton( "drag_right_psl2",$DRorigL+12,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3 •");
ENDIF
EndSub


Sub SE_StageLeft($userName)
IF ( $DragMode == "Drag" )
THEN
$drag_penalty = 1;
closePrivButton( "hud_message");
closeGlobalButton ("drag_info_text&drag_left_sl1&drag_rights_sl1");
openGlobalButton( "drag_info_text",75,1,50,5,5,5,0,"^7Stage set; Start sequence initiated");
openGlobalButton( "drag_left_sl1",$DRorigL+1,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3•"); # shows Stage lights for driver on left
openGlobalButton( "drag_rights_sl1",$DRorigL+3,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3 •");
DelayedCommand( $RTime, SE_CountDownTop );
ENDIF
EndSub


Sub SE_StageRight ($userName)
IF ( $DragMode == "Drag" )
THEN
$drag_penalty = 1;
closePrivButton( "hud_message");
closeGlobalButton ("drag_left_sl2&drag_rights_sl2");
openGlobalButton( "drag_left_sl2",$DRorigL+10,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3•"); # shows Stage lights for driver on right
openGlobalButton( "drag_rights_sl2",$DRorigL+12,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^3 •");
DelayedCommand( $RTime, SE_CountDownTop );
ENDIF
EndSub


Sub SE_CountDownTop()
IF ($DragMode == "Drag" && $drag_penalty<2)
THEN
closeGlobalButton ("drag_left_cdyt&drag_right_cdyt");
openGlobalButton( "drag_left_cdyt",$DRorigL,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3•"); # Changes top single light to yellow
openGlobalButton( "drag_right_cdyt",$DRorigL+8,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3 •");
DelayedCommand( $RandTime, SE_CountDownMiddle );
ENDIF
EndSub


Sub SE_CountDownMiddle()
IF ($DragMode == "Drag" && $drag_penalty<2)
THEN
closeGlobalButton ("drag_left_cdym&drag_right_cdym");
openGlobalButton( "drag_left_cdym",$DRorigL,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3•"); # Count Down Yellow middle
openGlobalButton( "drag_right_cdym",$DRorigL+8,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3 •");
DelayedCommand( $RandTime, SE_CountDownBottom );
ENDIF
EndSub


Sub SE_CountDownBottom ()
IF ($DragMode == "Drag" && $drag_penalty<2)
THEN
closeGlobalButton ("drag_left_cdyb&drag_right_cdyb");
openGlobalButton( "drag_left_cdyb",$DRorigL,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3•"); # Count Down Yellow bottom
openGlobalButton( "drag_right_cdyb",$DRorigL+8,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3 •");
DelayedCommand( $RandTime, SE_Start );
ENDIF
EndSub


Sub SE_Start ()
IF ($DragMode == "Drag" && $drag_penalty<2)
THEN

$drag_penalty = 0;

closeGlobalButton ("drag_left_psl1&drag_left_psl2&drag_left_sl1&drag_left_sl2&drag_left_cdyt&drag_left_cdym&drag_left_cdyb&drag_left_st&drag_left_rp");
closeGlobalButton ("drag_right_psl1&drag_right_psl2&drag_rights_sl1&drag_rights_sl2&drag_right_cdyt&drag_right_cdym&drag_right_cdyb&drag_right_st&drag_right_rp");

# Left side
openGlobalButton( "drag_left_psl1",$DRorigL+1,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); # Pre-stage lights
openGlobalButton( "drag_left_psl2",$DRorigL+10,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•");
openGlobalButton( "drag_left_sl1",$DRorigL+1,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); # Stage lights
openGlobalButton( "drag_left_sl2",$DRorigL+10,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•");
openGlobalButton( "drag_left_cdyt",$DRorigL,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow top
openGlobalButton( "drag_left_cdym",$DRorigL,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow middle
openGlobalButton( "drag_left_cdyb",$DRorigL,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow bottom
openGlobalButton( "drag_left_st",$DRorigL,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^2•"); # Start Light turns green
openGlobalButton( "drag_left_rp",$DRorigL,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Penalty Light

# Right side
openGlobalButton( "drag_right_psl1",$DRorigL+3,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_psl2",$DRorigL+12,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_rights_sl1",$DRorigL+3,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_rights_sl2",$DRorigL+12,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdyt",$DRorigL+8,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdym",$DRorigL+8,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_cdyb",$DRorigL+8,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
openGlobalButton( "drag_right_st",$DRorigL+8,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^2 •");
openGlobalButton( "drag_right_rp",$DRorigL+8,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •");
ENDIF
EndSub


Sub SE_PenaltyLineLeft ($KeyFlags)
IF ( $drag_penalty == 1 )
THEN
$drag_penalty = 2;
closeGlobalButton ("drag_left_st&drag_left_rp");
openGlobalButton( "drag_left_st",$DRorigL,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3•"); # Start Light turns yellow
openGlobalButton( "drag_left_rp",$DRorigL,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^1•"); # Penalty Light turns red
ENDIF
EndSub


Sub SE_PenaltyLineRight ($KeyFlags)
IF ( $drag_penalty == 1 )
THEN
$drag_penalty = 2;
closeGlobalButton ("drag_right_st&drag_right_rp");
openGlobalButton( "drag_right_st",$DRorigL+8,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^3 •"); # Start Light turns yellow
openGlobalButton( "drag_right_rp",$DRorigL+8,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^1 •"); # Penalty Light turns red
ENDIF
EndSub

It's working and if someone jumps the start, lights stops to countdown and drivers need to stage again for next race.

Can you help me out how to make at the end only to show who win, without any timers, splits, etc...?
who can help me?
can't add guest help meee why? why?
i make may home server but game password doesnot match writte help me all pls
Quote from sinanju :Added video to YouTube HERE to show drag system in action.

Can you update the script please? lights aren't working..
Type !drag to enable drag system (assuming drag.lpr is in the /includes directory, and has been added into the addonused.lpr file).
1

FGED GREDG RDFGDR GSFDG