The online racing simulator
[CODE] Race Control Manager
LFS RCM (uTube Video)

I've made a Race Control Manager (RCM) for use by admins in LFSLapper.

It's a fairly simple aid to helping admins running their server.

Made and tested with LFSLapper version 6.012.

I've used code made publically available by both Krayy and Fire_optikz001 for some of the messaging part of the system.

As usual, to use, edit your /includes/addonused.lpr file by including
include( "./racecontrol.lpr");

Should be fairly easy to change anything to suit your own circumstances.

This is provided "as is", without warranty, or any sort of come back, and any damage to pc, server or anything else may not be entirely co-incidental, so please back up everything.

EDIT
===

Added Version 2. See new image.

Layout totally different.
Attached images
RCM screenshots.png
Lapper RCM Ban Penalties.jpg
Lapper new penalties section.jpg
Lapper RCM Screens V1 7.jpg
LFS Lapper RCM V2.png
Attached files
racecontrol (V1.6).zip - 9.3 KB - 720 views
racecontrol(V1.7).zip - 10.9 KB - 672 views
racecontrol (V2).zip - 8.7 KB - 1335 views
Something is wrong... when I type "!rcm" I get a black-white little screen showing options "Race menu control" and "Close" only.

Saved the file racecontrol.lpr to Lapper/bin/default/includes
Edited the addonused.lpr by copying your text on first line above include( "./safetycar.lpr");

What am I doing wrong?

Tnx
Worked ok for me.

However, I've reloaded the file, and included a rar file version too.


EDIT

Just downloaded the zip file and put into clean install of lapper, and it's working ok for me.
Works fine now
The "old" file was smaller, about 6KB, this one is about 28KB.

Thank you!
Used "normal" compression this time rather than "ultra".
Updated version now added to post #1.

Update includes yellow and blue flag options along with lights in HUD.

PS
There's a bit in the code (both versions) about email being sinanju@hotmail.co.uk - if you search for that part, and substitute your own.
Quote from sinanju :Updated version now added to post #1.

Update includes yellow and blue flag options along with lights in HUD.

PS
There's a bit in the code (both versions) about email being sinanju@hotmail.co.uk - if you search for that part, and substitute your own.

Hi Sinanju, I was wondering if you could help me. Me and my friend (Jonathon.provost) are having 2 small problems. 1) do you know how to turn off the auto spectate in lfs lapper ? 2) anytime an admin leaves the pits, the race control just resets itself. Any ideas on how to fix that ? If you do, it would be a great help.

Thanks
1. /spec issue
You could look thru your lfslapper.lpr file and search for /spec.

Wherever you find a line with /spec in it, you could put a hash (#) symbol at the beginning of the line, and that will tell lapper to ignore it.

e.g.

On the event Event OnSwearWords2($userName ), if you ignore first warning to stop swearing, lapper will automatically spec you. So change

<?php 
    cmdLFS
"/spec " GetCurrentPlayerVar("NickName") );
?>

to

<?php 
#    cmdLFS( "/spec " . GetCurrentPlayerVar("NickName") );
?>

2. /admin issue
I'll have problems testing that as I'm the only admin on my server, and I only tested it in race and spectate mode.

The easiest way I can think of (off hand) is remove the IF - THEN - ELSE - ENDIF part of the Sub DoRCM (in other words, only leave the closePrivButton and openPrivButton part of the code within the sub-routine), and where I have CASE "!rcm": and all the other permutations change it to something only the admins are told, e.g. CASE "!secretsquirrel": or any other series of letters or word you want.

In other words,
from

<?php 
    
SWITCH ( $command )
        CASE 
"!rc":  #    Words/Text needed to start Race Control Menu
        
CASE "!RC":
        CASE 
"!rcm":
        CASE 
"!RCM":            
        CASE 
"!racecontrol":
        CASE 
"!RACECONTROL":
            
DoRCM(0,0);
        BREAK;
?>

to something like


<?php 
    
SWITCH ( $command )
        CASE 
"!secretsquirrel":
        CASE 
"!SECRETSQUIRREL":
            
DoRCM(0,0);
        BREAK;
?>

Attached files
racecontrol.lpr.txt - 36.1 KB - 501 views
Thats great, Thank you Sinanju. 2 more small things.

1) The car reset limit ( You are aloud 4 resets for your car before you get spectated for each one ). Could you tell me what file that is in the lfs lapper so i can disable it.

2) Kick for 2 times speeding in pits. Could you also tell me that file name so i can disable that one to.

Many Thanks
Quote from Poldy1603 :Thats great, Thank you Sinanju. 2 more small things.

1) The car reset limit ( You are allowed 4 resets for your car before you get spectated for each one ). Could you tell me what file that is in the lfs lapper so i can disable it.

You can have as many resets as you like.

Look in your lfslapper.lpr file, and search for #Actions to do on Car Reset

Delete that section if you don't want it.

2) Kick for 2 times speeding in pits. Could you also tell me that file name so i can disable that one to.

This is also in your lfslapper.lpr file.

Search for #Actions on penalties and delete Event OnFastDriveOnPitL1, Event OnFastDriveOnPitL2 and Event OnMaxFastDriveOnPit sections.
You have been a great help thank you. I will let you know if it works.

One last thing - a few posts ago when I said about the insim resetting when someone ( not just an admin ) leaves the pits. You gave me a file that I put into the racecontrol and it still seems to be doing it :S
The problem is that the code is opening Global buttons when a new player joins (leaves pits):


<?php 
# HUD Status Section
####################

Event OnNewPlayerJoin$userName )  # Player event

    
openGlobalButton"hud_back",70,0,60,14,1,-1,16,"");
    
openGlobalButton"hud_penback",71,1,39,6,1,-1,32,"");
    
openGlobalButton"hud_pexback",71,7,39,6,1,-1,32,"");
    
openGlobalButton"hud_trackback",110,1,19,12,1,-1,32,"");
    
openGlobalButton"hud_lightsbackleft",66,2,4,12,1,-1,16,"");
    
openGlobalButton"hud_lightsbackright",130,2,4,12,1,-1,16,"");
    
openGlobalButton"hud_pentext",71,1,40,5,5,-1,64,langEngine"%{hud_pentext}%"));
    
openGlobalButton"hud_pextext",71,7,40,5,5,-1,64,langEngine"%{hud_pextext}%"));
    
openGlobalButton"hud_tracktext",109,1,21,5,1,-1,0,langEngine"%{hud_tracktext}%"));
    
openGlobalButton"hud_penfront",97,2,12,4,1,-1,16,"");
    
openGlobalButton"hud_pexfront",97,8,12,4,1,-1,16,"");
    
openGlobalButton"hud_trackfront",111,6,17,6,1,-1,16,"");     
       
EndEvent
?>


Change all those openGlobalButton to openPrivButon and that should fix it. BTW, other modules use the OnNewPlayerJoin event, so it's best to change the declaration to use CatchEvent so you don't overwrite them like this:


<?php 
CatchEvent OnNewPlayerJoin
$userName )  # Player event
    
openPrivButton "hud_back",70,0,60,14,1,-1,16,"");
    
openPrivButton "hud_penback",71,1,39,6,1,-1,32,"");
    
openPrivButton "hud_pexback",71,7,39,6,1,-1,32,"");
    
openPrivButton "hud_trackback",110,1,19,12,1,-1,32,"");
    
openPrivButton "hud_lightsbackleft",66,2,4,12,1,-1,16,"");
    
openPrivButton "hud_lightsbackright",130,2,4,12,1,-1,16,"");
    
openPrivButton "hud_pentext",71,1,40,5,5,-1,64,langEngine"%{hud_pentext}%"));
    
openPrivButton "hud_pextext",71,7,40,5,5,-1,64,langEngine"%{hud_pextext}%"));
    
openPrivButton "hud_tracktext",109,1,21,5,1,-1,0,langEngine"%{hud_tracktext}%"));
    
openPrivButton "hud_penfront",97,2,12,4,1,-1,16,"");
    
openPrivButton "hud_pexfront",97,8,12,4,1,-1,16,"");
    
openPrivButton "hud_trackfront",111,6,17,6,1,-1,16,"");     
EndCatchEvent
?>


Can someone translate that into English for me ?

Sorry, I don't speak code :S
Just cut and paste the second lot of code over the first in the racecontrol.lpr file
Whoops - silly me!

All Events should have started with CatchEvent - that's what can happen when not thinking when doing copy+paste.

Thanks for the heads-up on this and changing global to private buttons in the newplayerjoin section.
Version 1.3 now available, which takes care of some silly things pointed out by Krayy, and some updates on the HUD and flag systems.
Version 1.4 now available - extra HUD choices (whether to show Pit HUD parts). See 1st post for code and new image.
Currently working on another version that includes a proper 'penalties' section.

See my post HERE to see image(s).
Hi,
Vary nice thanks allot for helping me with all of this.
Kind Regards,
J.Provost
Version 1.5 just been added to first post.
May I make a sugestion?

How about an peanility clear thing like you have the penilitys.

Cheers,
J.Provost
Is there a command to clear penaltys?
/p_clear license
Thanks for that (/p_clear).

Need to think about it, as, due to a lack of space, it would probably mean deleting the Unban button from the first penalty screen, placing the CLEAR button where the Ban (+) button is, and moving that button to the Unban button place.

Either that or maybe add in an additional page.

OPTIONS
Messaging
Track Options
Pitland Options
Penalties (clicking takes you to PENALTIES)
Pit HUD Display

then

PENALTIES
Driving Penalties (clicking takes you to DRIVING PENALTIES)
Ban Penalties (clicking takes you to BAN PENALTIES)

DRIVING PENALTIES
30 Secs | 45 Secs
StopGo | Drive Thru
Clear Penalty

BAN PENALTIES

12hrs | 1 Day
7 Days | 30 Days
90 Days | 999 Days
Clear Ban

Let me know what you think, then I'll have think about it.
Quote from Whiskey :/p_clear license

I'll send an update to Sinanju soon on how to do this. The wife broke her finger on Monday so I'm running a bit behind
1

[CODE] Race Control Manager
(50 posts, started )
FGED GREDG RDFGDR GSFDG