The online racing simulator
Hey guys... why don't You post a working example? Maybe for noobs it would be simpler...
hi
i have problem this new lapper.how i make clickable buttons in !help window? example:type !help. after in comand list, click to !drf button.will open !drf window.
and last question in schedule action how i make automatic type /rcm_all command per hour?
Quote from Max Torque :hi
i have problem this new lapper.how i make clickable buttons in !help window? example:type !help. after in comand list, click to !drf button.will open !drf window.
and last question in schedule action how i make automatic type /rcm_all command per hour?

Clickable buttons - done same way as any other button - the !help command opens up a large button with text in it. Just make it open another button at same time before the !help sub routine finishes - bit like the CLOSE button underneath the Help window.

Likely you'll have to move the help text within the button and then carefully place your other button(s) beside the correct piece of text.

This other button(s) should have as part of it's sub-routine that it closes all the other buttons within and including the help first before you open the new button or table.

I did something like that few years ago in one of my older lapper scripts - fair bit of work, but quite effective.


/rcm all - look for RegisterScheduleAction items in the LFSLapper.lpr script and in the /doc/changes.txt file
Attached images
LFS Help Commands.JPG
ty for your help sinanju.can you give me example code for clickable buttons?(same as in your picture)
hi
is it possible to read the lfs commands like:
/laps


example:
IF( cmdlfs ("/laps 0"))
THEN
//your code here
ENDIF
I wonder, can I create empty field for players to fill.and save to entered text (same as pb list).ty
Quote from Max Torque :ty for your help sinanju.can you give me example code for clickable buttons?(same as in your picture)

See attached text file.

However, this was done in the much older version of lapper, when Register MsgAction commands were used.

This has now been changed to CASE commands.

For instance, my old code has;
Register MsgAction("!help",MA_help);
Sub MA_help()
......
EndSub

Now you would use something like;
CASE "!Help":
DoHelp_Page1(0,0);
BREAK;

I've never got round to converting to new version of lapper.

I'm currently without phone and broadband at home just now (maybe even another few weeks) so don't have inclination to change code.

But you can use and change my code if you want - at least the button locations are of use.

Little bit of an explanation of RegisterMSgAction/CASE convertion can be found on this part of the forum in post number 30.

Good luck.
Attached files
Extract of Working LFSLapper of 14 Jan 09 which includes imbedded commands within help label.txt - 10.7 KB - 236 views
ty for help sinanju

i have a problem now.i converted this.works perfectly.but i dont convert this.
openPrivButton( "buttontop",125,40,12,5,5,-1,80,"^6!top",MA_top );
what i type for "MA_top" (in new lapper version)? so lapper does not respond to click in !help menu.
Quote from Max Torque :ty for help sinanju

i have a problem now.i converted this.works perfectly.but i dont convert this.
openPrivButton( "buttontop",125,40,12,5,5,-1,80,"^6!top",MA_top );
what i type for "MA_top" (in new lapper version)? so lapper does not respond to click in !help menu.

Try

openPrivButton( "buttontop",125,40,12,5,5,-1,80,"^6!top",DoMyTop );

If you look in the "/includes" folder, you will see a tops.lpr file. The 'DoMyTop' sub-routine is in that file.
ty sinanju
sin'rs lapper is best i have ever seen.there are very labor Do you think share your scoring system (!licence,!points,!rank) settings and pit exit message commands?,

and in RegisterScheduleAction if i use this
RegisterScheduleAction( "0 0 1 * * * *", SA_mid );
lapper show "mid" every hour ?I want to shows every hour
thats ok but
openPrivButton( "buttontrack",125,75,12,5,5,-1,80,"^6!track",MA_track );
what I type instead of "ma_track" ? and for all other commands (!stats !dstats !near !cleanspb !laps !hand ....)
hey its me again
i have a really weird bug maybe u could help with it.

example of the code i made:



CASE "!excommand":
openPrivButton( "examplebtn",84,164,31,10,7,-1,16, "^2Example" ,example);
BREAK;


Sub example( $KeyFlags,$id )
UserGroupFromFile( "Example" . $userName, "User/Example/" . $userName . ".txt" );
IF( UserInGroup( "Example" . $userName , $userName ) == 1 )
THEN
privMsg("^7>Username Already Exist" );
ELSE

IF( UserInGroup( "Example" . $userName , $userName ) != 1 )
THEN
MoveUserToGroup( "Example" . $userName, "example line");
UserGroupToFile( "Example" . $userName, "User/Example/" . $userName . ".txt" );
privMsg("^7>Create File" );
closePrivButton("examplebtn");
ENDIF
ENDIF
EndSub

My problem is:
It always create a file when the file exist or not
Quote from Max Torque :ty sinanju
Do you think share your scoring system (!licence,!points,!rank) settings and pit exit message commands?,

and in RegisterScheduleAction if i use this
RegisterScheduleAction( "0 0 1 * * * *", SA_mid );
lapper show "mid" every hour ?I want to shows every hour

Scoring system - long time ago, Tim NL made his scoring system public - see http://www.lfsforum.net/showthread.php?t=61449 - the code is on the first page.

It's what I use.

Pit Exit Messages - I've got same message for every track I've got the !zone for.

To get the zone, go to part of track you want message to appear, and type !zone. Note the zone parameters (e.g. -120:79); watch for the negative numbers.

In your Lapper config file, look for the RegisterZoneAction coding (it's near the top).

Then type in something like the following;

[COLOR=Navy]RegisterZoneAction( "AS1" , -313,-136, 3 , SE_leavepits,"" );[/COLOR]

AS1 = Aston Cadet
-313,-136, 3 = zone parameters
SE_leavepits = sub-routine

Then make up the sub-routine;

[COLOR=Navy]Sub SE_leavepits( $userName ) # A Sinanju Event
$NickName = GetCurrentPlayerVar("NickName");
openPrivButton( "blank_back",152,45,46,25,3,8,32," ");
openPrivButton( "remember",153,46,44,8,6,8,32,langEngine( "%{main_remember}%", $NickName ));
openPrivButton( "leavepits",153,60,44,5,4,8,16,langEngine( "%{main_leavepits}%" ));
EndSub[/COLOR]

Note - all my sub-routines are called SE_x for Sinanju Events.

Then add the following into the ENglish Language section

Lang "EN"

[COLOR=Navy]main_remember = "^1! ^0R E M E M B E R^1 !"
main_leavepits = "^1Watch for traffic&^1when exiting pitlane";[/COLOR]

Or translate into other languages, and put in relevant language section.

RegisterScheduleAction - not sure what you mean here.

The way it works is;

RegisterScheduleAction( "0 0 0 0 * * *", SA_mid ); = at 0 secs, 0 mins, 0 hrs, Sunday (0), ignore day (*), ignore month (*), ignore year (*), then do the SA_mid sub-routine.

In other words - do the sub-routine only on a Sunday at 0:00

dayOfWeek start at 0 = Sunday
0 = Sunday
1 = Monday
2 = Tuesday
3 = Wednesday
4 = Thursday
5 = Friday
6 = Saturday

You've got yours to do sub-routine every hour.
Quote from Max Torque :thats ok but
openPrivButton( "buttontrack",125,75,12,5,5,-1,80,"^6!track",MA_track );
what I type instead of "ma_track" ? and for all other commands (!stats !dstats !near !cleanspb !laps !hand ....)

If you look at the text file I put in my reply, you'll see code like;
Quote :
Register MsgAction("!track",MA_track);
Sub MA_track()
closePrivButton("help&help2&close");
closePrivButton("buttontop&buttondrf&buttonstats&buttondstats&buttonnear&buttonspb&buttoncleanspb&buttontrack");
closePrivButton("buttonlaps&buttonhand&buttonpit&buttondrift&buttonpitboard&buttonmystats&buttontopqual&buttonstatsqual");
privMsg( "^3Track in use: ^2" . $ShortTrackName . " = " . $LongTrackName );
EndSub

$ShortTrackName and $LongTrackName may have changed in newer versions of lapper.

If you look in the original zipped Lapper download, you'll see a folder called "docs". Inside that folder is a file called changes.

Read this, and the default LFSLapper.lpr files to see what's changed, and examples of how things used.
hi sinanju and lapper users.Thank you for your reply sinanju..They help me for a lot of work.
i have a few problems.

i want to server welcome warning message, don't show to already accepted players.and also pitboard configuration in server welcome don't show to already set players.probably this makes with UserStoredValue command.i dont understand how to use UserStoredValue.
-----
i read this threads
http://www.lfsforum.net/showthread.php?t=61635
http://www.lfsforum.net/showthread.php?t=61166
but i dont understand.very mixed.which works ?for login and register commands, what can i do ?
-----
players entering the server, for join to race wait 2 minute..how can i do?
-----
and last, i want to create create empty field for players to fill.and save to entered text.
ty
fixed
ty
bassdriver solved this problems
hi there
lil question

if i have a file with 10 users in it.
is it possible to show how many users the file has like the example below

$ListOfUsers = GetListOfUsersGroup(ExampleFile);
privMsg( "^7>There are ( ^3" . $ListOfUsers . " ^7) Users in this file");

but its show Array for $ListOfUsers.
Quote from Bass-Driver :hi there
lil question

if i have a file with 10 users in it.
is it possible to show how many users the file has like the example below

$ListOfUsers = GetListOfUsersGroup(ExampleFile);
privMsg( "^7>There are ( ^3" . $ListOfUsers . " ^7) Users in this file");

but its show Array for $ListOfUsers.


<?php 
$ListOfUsers 
GetListOfUsersGroup(ExampleFile);
$ListOfUsers arrayCount($ListOfUsers);
privMsg"^7>There are ( ^3" $ListOfUsers   " ^7) Users in this  file");
?>

it doesnt work

5/30/2010 8:19:20 PM -> Syntax error in cfg file "LFSLapper.lpr" at line #649
You can't change the dimension of an array...
Function 'onconnect' script aborted

i have version 5.925
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 ;-)
Quote from Gai-Luron :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][COLOR=#000000][COLOR=#007700]. [/COLOR][COLOR=#dd0000]" ^7) Users in this file"[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]

it's better ;-)

thx it works
This thread is closed

Config help
(1112 posts, closed, started )
FGED GREDG RDFGDR GSFDG