The online racing simulator
Searching in All forums
(966 results)
Gai-Luron
S3 licensed
Hello,

@Crazy_Fox [UA]
Modify trackinfo.cfg as desired

Gai-Luron
Gai-Luron
S3 licensed
Hello,

the post you quoted is for krayy. Restore your default file

Gai-Luron
Gai-Luron
S3 licensed
New lpr Release By Krayy: 6.6.1.1



+-------------------------------+
|Changes from v6.010 to 6.011 |
+-------------------------------+
Add Krayy Library

1. remove old help command in lfslapper.lpr
2. Add multi tabbed lib in .lpr file, look at gui_help on how to use
3. New commands in lfs:
!ma
!hc
!help
Multi-lang to do in gui_help.lpr

Gai-Luron
S3 licensed
Hello,

it's possible, but it's better to let the choice to the admin.

track = ALL
car = ALL
MaxLapTime = 105%
split1 = 105%:110%
split2 = 105%:110%
lapTime = 105%:110%
car = XFR
MaxLapTime = 112%
split1 = 106%:112%
split2 = 106%:112%
lapTime = 106%:112%
...
track = BL1
car = XFR
MaxLapTime = 110%
split1 = 105%:110%
split2 = 105%:0.55.00
lapTime = 105%:1.16.61

But the pubstatidk must be required in this case or maybe using an alternate value separated by '|'. % are used if pubstat value are availlable or time if not
exemple:
MaxLapTime = 150%|2.30.22

looking for a % or a time in time section to calculate the good time value.

Adding track = ALL allowing only % in value. this section can be alone, no need to definite all over track, car section

removing len in each section, because the value are present in the file tracklist.cfg


@krayy : trackinfo.zip for test is attached

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
$VoteRestart = 200

this alow that 200% of player have to vote restart, in this case it's impossible to reach 200%. No vote allowed
Gai-Luron
S3 licensed
New Patch Release By Krayy: 6.6.1.0

Quote :
+-------------------------------+
|Changes from v6.001 to 6.010 |
+-------------------------------+
Patch For Krayy

1. New vars:
"mustpit" – this returns a 1 or 0 if the /mustpit flag is set in the server (although it only does it when it receives an IS_RST, which is at restart, so maybe we should request an IS_RST at certain times during the race, like 25%, 50% and 75% complete)

2. New functions:
Getplayervarbyucid – returns a var when giving the UCID. Used for more compact lpr code when using buttons (see attached gui files, which I will put on forums later)
Getplayervarbyplid – as above but uses PLID
Userisserveradmin – has the user logged in as a server admin, or is he a member of admin group, or is he UCID 0?

3. New event:
OnButtonFunction – run when user presses Shift+I or Shift+B

+-------------------------------+
|Changes from v5.925 to 6.001 |
+-------------------------------+
Files to replace From the previous version
- LFSLapper.exe
- who.lpr

1. No need to unset var if reasigned with getListXXXX GLScript function


+-------------------------------+
|Changes from v5.925 to 6.000 |
+-------------------------------+
Files to replace From the previous version
- LFSLapper.exe
Files to Add in exe folder
- libsqlite3.so.0.so
- System.Data.SQLite.dll
- sqlite3.dll
Files not yet used
- Mono.Data.SqliteClient.dll


Gai-Luron
S3 licensed
Hello,

Did you set your pubstatIdk in config file?

Gai-Luron
Gai-Luron
S3 licensed
Hello,

not possible, the info it's not available in insim

Bye

Gai-Luron
Gai-Luron
S3 licensed
Or 6.00
Gai-Luron
S3 licensed
Hello,

Quote :1. Does the overload: setPlayerVar( $CurrUname, "topSpeed",0 ); exist?

What you mean by overload

Quote :FOREACH( $CurrUname IN $ListOfPlayers )
...
BREAK;
ENDFOREACH

BREAK; exit the loop at first pass. For this work var $ListOfPlayers must be set first with GetListOfPlayers function. You can see if this var is set using command dumpVar( $ListOfPlayers ); this display on console the content of any var

1. GetListOfPlayer accept an optional argument to sort the list og player
Example:
$list = GetListOfPlayers("U"); # List sorted by userName
Or
$list = GetListOfPlayers("N"); # List sorted by nickName

Dont use { and } in a block structure this is not required

Language you are coding in LFSLapper.lpr is a home made language GLScript ( Gai-Luron Script :razz

LFS is in C++
LFSLapper in C#
Gai-Luron
S3 licensed
Quote from sju :Hi.

I've server in 500 servers. I installed lfslapper to it. I made all? configs what are needed. Lapper connect to server, but no welcome message and it doesn't answer to any commands. All what it do is telling: LFSLapper go in Work State. There is not any errors in logs.
Any ideas to get it work?

sju

Hello,
Port seem good, take a look in log folder
Gai-Luron
Gai-Luron
S3 licensed
Hello,

First Check if you have error in log file. ( Log files are on log folder )

Gai-Luron
Gai-Luron
S3 licensed
Hello

using FOREACH and GetListOfPlayers()
This is the functions to use not the functionnal code.



$ListOfPlayers = GetListOfPlayers();
$CurrTopSpeed = GetStoredValue( "GlobaltopSpeed" );
FOREACH( $CurrUname IN $ListOfPlayers )
....
$currTopSpeed = getPlayerVar( $CurrUname,"topspeed" );
....
SetStoredValue( "GlobaltopSpeed", $newTopSpeed );
....
ENDFOREACH



Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

you can use player var for topspeed. First, you need to set in "onconnect" event.
...
setCurrentPlayerVar( "topSpeed",0 )
...

Theorically in your code you can put


...
$speed = toint( GetCurrentPlayerVar( "InstantSpeed" ) );
$topspeed = toint( GetCurrentPlayerVar( "topSpeed" ) );
IF ($speed > $topSpeed)
THEN
setCurrentPlayerVar( "topSpeed", $speed );
privMsg( "^7>Nouveau top speed: ( ^3" . $speed . " ^7) km/h");
ELSE
privMsg( "^7>Vitesse: ( ^3" . $speed . " ^7) km/h");
ENDIF
...

bye

Gai-Luron
Gai-Luron
S3 licensed
Hello


[COLOR=#000000][COLOR=#0000BB]$ListOfUsers [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]GetListOfUsersGroup[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]ExampleFile[/COLOR][COLOR=#007700]);
[/COLOR][COLOR=#0000BB]$NbUsers [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]arrayCount[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$ListOfUsers[/COLOR][COLOR=#007700]);
[/COLOR][COLOR=#0000BB]privMsg[/COLOR][COLOR=#007700]( [/COLOR][COLOR=#DD0000]"^7>There are ( ^3" [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#0000BB]$[/COLOR][/COLOR][COLOR=#000000][COLOR=#0000BB]NbUsers [/COLOR][COLOR=#007700][/COLOR][/COLOR][COLOR=#000000][COLOR=#0000BB][/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]" ^7) Users in this file"[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]

it's better ;-)
Gai-Luron
S3 licensed
Hello,

I make a break, no dev for now! to much work at my job

Gai-Luron
Gai-Luron
S3 licensed
Take a look here on how work http request

http://www.lfsforum.net/showthread.php?t=63188

Gai-Luron
Gai-Luron
S3 licensed
I think ( i am not sure ) const don't work in array Index. You can bypass it using

GlobalVar $MemberTypes;
$idx = MEMBERTYPE_VISITOR;
$MemberTypes[$idx] = "Visitor";
$idx = MEMBERTYPE_GUEST;
$MemberTypes$idx] = "Guest";
...
and so on

Gai-Luron
Gai-Luron
S3 licensed
Hello,

New selected car is activated only when you return on track. It's an insim limitation, car is sended on join track not on change in pit
If you join server with a different Car, the value used is defaultTopCar. This value is set on join track

Gai-Luron
Gai-Luron
S3 licensed
Not a bug
Gai-Luron
S3 licensed
Hello,

Store session lap in player Var and test it when player rejoin the qual. But this dosen't prevent player to disconnect and reconnect.

Gai-Luron
Gai-Luron
S3 licensed
Hello 6.0.0.0 can be considered as stable version.

I'am busy on how to use Grammatical analyser to use with current GLScript Lexer to have an easy way to upgrade and powerfull GLScript.

But you can use 6.0.0.0, it's seem's to e stable


Gai-Luron
Gai-Luron
S3 licensed
In 6.0 it's avaiable
Gai-Luron
S3 licensed
CatchEvent OnLapperStart ( )
RegisterScheduleAction( "0 0 22 * * * *", SA_race ); #Start race mode at 22pm every day
RegisterScheduleAction( "0 0 0 * * * *", SA_qual ); #Start qual mode at 24pm every day
# Start in in rigth mode
$tim = GetLapperVar( "ShortTime" );
if( SubStr( $tim, 0,2 ) == "10" && SubStr( $tim, 6,2 ) =="PM" ) THEN
DelayedCommand( 10, SA_race );
ELSE
DelayedCommand( 10, SA_qual );
ENDIF
endCatchEvent

Sub SA_race()
cmdLFS("/qual=0");
cmdLFS("/laps=1");
cmdLFS("/restart");
EndSub
Sub SA_qual()
cmdLFS("/qual=60");
cmdLFS("/qualify");
EndSub

Gai-Luron
S3 licensed
CatchEvent OnLapperStart ( )
RegisterScheduleAction( "0 0 22 * * * *", SA_race ); #Start race mode at 22pm every day
RegisterScheduleAction( "0 0 0 * * * *", SA_qual ); #Start qual mode at 24pm every day
# Start in in rigth mode
$tim = GetLapperVar( "ShortTime" );
writeLine( SubStr( $tim, 0,2 ) );
if( SubStr( $tim, 0,2 ) == "10" ) THEN
DelayedCommand( 10, SA_race );
ELSE
DelayedCommand( 10, SA_qual );
ENDIF
endCatchEvent

Sub SA_race()
cmdLFS("/qual=0");
cmdLFS("/laps=1");
cmdLFS("/restart");
EndSub
Sub SA_qual()
cmdLFS("/qual=60");
cmdLFS("/qualify");
EndSub

FGED GREDG RDFGDR GSFDG