The online racing simulator
Simple driftmeter
Hello ,

I would like to ask , that what insim is used in a lot of server which shows the driftpoint and angle in real time. I use LFSLapper but it has so big delay between showing ... There is anybody, who could give advice in lapper to show in real time the scoring and angle like on Lislon Drift S2 Server ?

All the best SarXes
I think it is LFS Lapper
Quote from impresora :I think it is LFS Lapper

So if its lapper is very interesting ,how is made ...
#4 - PoVo
Quote from sarxes :So if its lapper is very interesting ,how is made ...

Try searching for something like "drift angle" or "drift points" in the LFSLapper section of the forum. I've seen numerous requests like that before, so there are bound to be some posts that should answer your request.
they set there insim up like that. you can find the basic one in lapper section. its called drift points. its fairly basic about what is in it far as drifting go it shows speed angle but not as good as lislon
Hey,

I want to make the reports continuously. For example, once per second to chat a new message. Or make a button that will flash, once per second to appear and disappear.
How?

Command DelayedCommand() does not work, or I used it incorrectly.
Sorry for my bad Eng
Quote from Lexanom :Hey,

I want to make the reports continuously. For example, once per second to chat a new message. Or make a button that will flash, once per second to appear and disappear.
How?

Command DelayedCommand() does not work, or I used it incorrectly.
Sorry for my bad Eng

If you're using LFSLapper then what you need is
%at% for alternative text
ISB_BLINK for text that you want to blink off/on

Look in the lapper /doc directory for examples.

On my server (Sin'rs), I use the alternative text in my circular drift meter to advise that drift scores aren't saved on an out lap


<?php 
    openPrivButton
"circledrift_notscore",21,140,20,12,1,-1,0,"^1> Scores not saved <%at%^1> on your outlap <"  );
?>

and I use the blink facility for flashing circular blue lights when someone leaves the pits.


<?php 
  openGlobalButton
"hud_blinkleft",71,1,58,5,4,8,ISB_DARK ISB_BLINK,"^4• •"" ));
?>


sinanju
ok, tnx
But how to make chat messages every few seconds?

Another: how do I check the position of cars at a time? for example, to calculate the distance to a point

I know how to use the function GetCurrentPlayerVar( "x,y" ),
and I do not know how to do it every time.

----
Maybe I can make a function that will be executed every time?
Messages
If you mean automatic messages, then play around with the RegisterScheduleAction function.

For instance, I used to have a function for putting my email up every so often, using the following;

Under the Event OnLapperStart() heading, but before EndEvent, I had


<?php 
    RegisterScheduleAction
"42 57 1 * * * *"SE_email );
?>

Bit later (after the EndEvent), I had the sub-routine SE-email


<?php 
Sub SE_email
() # A Sinanju Event
    
globalRcm("Comments to [email protected])";
EndSub
?>


Easy enough to make your own by just changing the message and the times.

You could make time something like

<?php 
    RegisterScheduleAction
"0 1 * * * * *"SE_email );
?>


Positioning

Position can also be got by typing !node (which gives line right across the track) or !zone (which gives the X,Y co-ordinates).

For instance,

RegisterZoneAction( "KY1R" , -356,2, 3 , DisplaySpeed );

looks up a sub-routine called 'DisplaySpeed', which gives car speed when driver enters a 3m x 3m zone around a point -356,2 at KY1R.
sinanju
Thank you very much!

Last question:
How to write to lapper did it?

$farX = $X1 - $X2 ;
$farY = $Y1 - $Y2 ;
$far = sqrt ( sqr($farX) + sqr($farY) ) ;

or
$far = sqrt ( $farX*$farX + $farY*$farY ) ;

don't work
Not sure that lapper can deal with square root of things - it does have pow^ symbol, but I think that means to the power of.


<?php 
Lapper variables that could be used on expressions
&&     and
||     or
+      
plus
-      minus
/      divide
*      multiply
^      pow
==     equal to
!=     not equal to
>      bigger than
<      smaller than
<=     smaller than and equal to
>=     bigger than and equal to
?>


ok...
how delete registered zone?
example:
RegisterZoneAction( "KY1R" , -356,2, 3 , DisplaySpeed );

in /doc written:
RegisterZoneAction( "MyZone", "SO6" , 337 , SA_Test3 );
RemoveZoneAction( idSched, track );
RemoveZoneAction("MyZone","SO6");

What is "idSched"?

I tried
RegisterZoneAction( "myzone","AU1" , -356,2, 3 , mytest1 );
...
RemoveZoneAction( "myzone","AU1");
lapper is crashed

----------
about ^
$far = 8^(0.5) = 8
$far = 8^(1/2) = 8
$far = 8^(2) = 64


it seems that lapper cannot use floating point numbers.

-------------------
At the same time
$far = 4/7 = 0.5714286
>.<

FGED GREDG RDFGDR GSFDG