privMsg This puts a message for one specified (by script) driver in top left corner (where normal text/talk messages are displayed). globalMsg Similar to above privMsg, but to all drivers. privRcm This is the one that puts the large text in middle of screen, but only for one specified driver. globalRcm Similar to above privRcm,but to all drivers. openPrivButton Can be used to put text message (like a label) or a variable (like sector time) for one specified driver. openGlobalButton Similar to above openPrivButton, but to all drivers. RegisterScheduleAction This can be used to make a globalRcm at a specified time (e.g. midnight warning).
In the "welcome" message when you've joined server - look for the Event OnConnect part of the lapper script, then for openPrivButton( "welc",25,40,150,15,12,-1,0, langEngine("%{main_welc1}%", $NickName ));
This gives first line of welcome message.
In the Lang "EN" section, search for main_welc1 and change this message to what you want. For instance, I have:
where {0} will be the username of the driver (already set up in the script), and %nl% just means new line.
So yours could be;
main_welc1 = "^3Welcome {0} ^3to%nl%^1TEAM ^7RHODY ^4RACING%nl%^7HTTP:RHODYRACING.COM%nl%^7Close Racing and Fassst fun is our Goal";
(not sure if lapper will be happy with the : after HTTP - you'd have to check it).
Or you could just make a sort of logo, and put it in a button (either private or global button), and decide if you want to show it all the time, or just for limited time (all the time you should make global and a fixed number of seconds make private button) - plenty of examples of openPrivbutton and openGlobalbutton text.
For instance, under Event OnNewPlayerJoin( $userName ) I have openPrivButton( "label_lfslogo",5,181,21,4,1,-1,128,langEngine( "%{label_lfslogo}%" ));
and under Lang "EN", I have label_lfslogo = "^7powered by ^3LFSLapper";
See attached image to see what I mean by welcome message and logo.
(I know my logo looks like a contradiction - a private button with -1 (no time limit), but I close the button in different circumstances, so its not always on).
Or you could make a message that appears every so often like the midnight warning message, which is done via RegisterScheduleAction( "0 0 0 * * * *", SA_mid ); and sub-routine Sub SA_mid() and Lang "EN" line main_midnight = "Midnight warning to all working men!";
Ok well that fix it a little bit now here is what I have.
See attached photo. Looks like the text is running over other text.
Or just connect to my racing server you will see what i mean.
Team Rhody Racing USA 1
If you could edit the lapper.lpr in the last post that would be great!
### At race start sub event ORS is executed Event OnRaceStart( $NumP ) # Lapper event DelayedCommand( 5, ORS ); EndEvent
### Sub event ORS displays the message set main_brake Sub ORS() IF ( $enable_pitboard == "true" ) THEN OnRaceStart_Pitboard(); ELSE globalRcm( langEngine( "%{main_brake}%" ) ); ENDIF EndSub
### main_brake in Lang "EN" section main_brake = "^3Please, brake in time!";
You've already been given the information on this...
Your text is just one big line - split it up by putting %nl% where you would want one line to end and another to start. Don't put any other punctuation in the line.
I think you need to know how to make buttons - this something I posted a while ago...
openPrivButton( "drewpitleave05",50,12,100,10,10,1,32,"^1R E M E M B E R !" );
Buttons and what your line means openPrivButton is for only driver to see, as against opening a global button for all to see (such as you'd get when race just about to start, etc) drewpitleave05 is unique button id 50 left out of 200 12 down from top out of 200 100 is width of button 10 is height of button 10 is spacing in multiline text 1 is time in seconds button will appear (use -1 if you don't want button to disappear - or use sub routine to close it)
32 is the background colour and orientation (clear, light or dark, with text left, centred or right)
^1 is the colour of the text on the button (in this case Red [see LFSlapper.lpr file for info on what colour is which])
! REMEMBER is the text that will appear on button.
So if you want button (or in this case, proper word would be label) to appear for 5 seconds, you would have
openPrivButton( "drewpitleave05",50,12,100,10,10,[B][COLOR=Red]5[/COLOR][/B],32,"^1R E M E M B E R !" );
I'm trying to divide a number (the driftscore) by the amount of time it takes to do a lap, but I can't divide this number by the lapper laptime output.
Assuming all you really need to do is get laptime in seconds only, then this works in lapperver6.011 for me.
<?php
$lpt = (GetCurrentPlayerVar("LapTime")); #make value of $lpt = raw laptime from DB and $lptis = $lpt/1000; # convert $lpt into time in seconds only with 2 decimal places. # and store as $lptis ?>
eg. laptime is 1.21.83 and has raw value of 81830 then divide by 1000 to get 81.83
Although I couldn't use $LP = GetCurrentPlayerVar( "LapTime" )); by itself, getting it in proper (NumToMSH) format, then asking for format to be put back into a number (MSHToNum) worked.
EDIT
Using your 'divide by 1000' makes number more managable!
i want one command to End the Race, change the track and load a layout after, how to do this?
CASE "!command": IF ( UserIsAdmin( $userName ) == 1 ) THEN cmdLFS( "/end" ) Thread.Sleep(4000) cmdLFS( "/track BL3" ) Thread.Sleep(10000) cmdLFS( "/axload layout" ); ENDIF BREAK;
This doesnt work :-S
Also how to add a Private chat regarding Nicknames? E.g. [TEAM]Michi119 and [TEAM]XYZ should be able to read the message when someone writes "!team test" :-S
Next Problem: Making Admin-Help only visible for admins :S
if i remember correctly there is currently to make lapper sleep... what you could do though is make it so it calls a timer or you could edit the source and add a sleep function yourself
i have the code somewhere where you can send team members messages... i will find it asap
how to do the thing with timer? :-S sry, i am kinda new to C# :-D
Done with trackchange - changed ctrack code as needed and added + included as new file :-)
does the code check for a Group or does it check the Nickname for a special tag? :-)
And, how to make special parts of Help only visible to special groups? :-S