The online racing simulator
Connected.lpr
I've just read about the new release of Lapper and suddenly realised I have an updated version of connected.lpr on my pc for months now. I've changed it a long time ago to accomodate a wish for a more random qualifying procedure.

When you have admin rights within Lapper, you will see 2 extra buttons behind a players name:

p_exit = displays a global chatmessage + RCM to selected player to go to pitlane exit
s_qual = displays a global chatmessage + RCM to selected player to start qualification

This could be useful when doing a single car qualification at oval races.
For example:

First car does outlap
Second car waits at the end of the pitlane
First car starts hotlap
Second car starts outlap
Third car goes to the end of the pitlane
etc. etc.

In the past I used the connected list from top to bottom or reversed but there was a need for a more random order. Now you can pick anyone you want and when a button is pressed it will color green so you know who has done what.

Since !status is used for something else, I've changed my command to !plstatus
Make sure to update this in your main configuration file.


Event OnMSO( $text ) # Player event
SWITCH( $command )
CASE "!plstatus":
set_player_status ( $KeyFlags , $argv );
BREAK;
ENDSWITCH
EndEvent

I've included an updated version of connected.lpr which is renamed to connected.txt in order to be able to upload it on this forum.
Attached files
connected.txt - 5 KB - 298 views
#2 - Krayy
My LFSLapper.lpr file has got the !conn command defined as:

SWITCH( $command )
...
CASE "!conn":
show_connected( 0,0 );
BREAK;

I'm not sure if this is the standard or not, so the connected function in your connected.lpr file might need to be renamed, or vice versa.
No problem, connected.lpr is called using !connected and has always been that way since I wrote it.
Question about !connected on Lapper 6.012
I'm trying to get the hang of the latest Lapper version, but ran into a problem I can't get my head around. So I thought, why not ask it here and learn something from it. In my current Lapper (5.846) I have an application which can be started with: !connected
That will bring up a window as shown in connected_5846.png below.

I've set up a new server with a default Lapper script, converted my !connected application to what I think is the right code, but when I fire it up I see an empty screen as shown on connected_6012.png below.

The !connected application uses the same array as used in my Pitboard application, which has been converted a long time ago and seems to be working as intended. Somehow the connected application can't read/find/use that array, but I have no clue.
Attached images
connected_5846.png
connected_6012.png
Attached files
connected_6012.txt - 5.3 KB - 196 views
#5 - Krayy
The $user_array hasnt been used for a bit nowadays as it was part of an older module. In 6.0* use the folowing to loop through users:

<?php 
            $ListOfPlayers 
GetListOfPlayers("N");
            FOREACH ( 
$Player IN $ListOfPlayers)
                
privMsg (" Player = " $Player["value"]);
            ENDFOREACH
?>

The GetListOfPlayers command returns an array of all players, sorted by name (using "N' param).
Thanks for your reply, but that exact same $user_array is used in my Pitboard application too, just downloaded Lapper and the Pitboard script (including that userarray) is in the include directory. It's working too, so I still wonder why my connected script can't get information out of that array.
I would really appreciate it, if someone could point me into the right direction with this problem. I've looked at it again but can't see why Pitboard can use &user_array while Connected can't.
#8 - Krayy
My lapper includes directory is wildly different from the stock at the moment, so could you zip yours up and send it me and krayy0@gmail.com and I'll have a look at it for you.
Thanks for the offer, email has just been send.
Long story short, 6.0.1.2 does not handle multi-dimensional arrays the same way that 5.8.4.6 does and it's breaking as the arrays are getting nerfed so the data isn't available any more:

---- Dump of user_array ----
$user_array[1,4] = ""
$user_array[1,5] = "Krayy[LFSNZ]"
$user_array[1,6] = 1
$user_array[1,7] = 0
$user_array[1,8] = 0
---- End Dump of user_array ----

I'm working on a Lapper add on that will provide array support, so give me a day or so and I'll have a solution for both 5* and 6* Lappers.
Any news/progress on the array fix?
Don't want to sound impatient, but any news on the array fix and maybe other fixed / addons?
Quote from Yisc[NL] :Don't want to sound impatient, but any news on the array fix and maybe other fixed / addons?

There was, but it'll be easier to use the GetListofPlayers function.

I'll look at it when I get a bit more time from updating my Lapper for a series we're starting

FGED GREDG RDFGDR GSFDG