The online racing simulator
[Solved] LFSLapper Welcome Message
Hi guys im creatin an server ¨|cruise| but i want to add an welcome message but how do i do it? could some1 give me the code? thx regards Iphone Developer Shahroch
Quote from shahroch :Hi guys im creatin an server ¨|cruise| but i want to add an welcome message but how do i do it? could some1 give me the code? thx regards Iphone Developer Shahroch

LFSLapper comes with built in welcome message.

If you look in the language section, e.g. Lang "EN" (for English), you will see a line that has

<?php 
main_welc1 
"^7Welcome {0} ^7to ^1LFSLapper ^7powered server !%nl%^2Type ^7!help ^2after leaving garage to see commands.";
?>

There's also a main_welc2 that forms part of the welcome message.

You can amend to suit yourself.

The {0} in the line will input nickname of driver reading message, and %nl% tells lapper to put next part on new line.

There's also a language section for Netherlands - look for Lang "NL".

The dutch version of the welcome message has

<?php 
main_welc1 
"^7Welkom {0} ^7op een ^1LFSLapper ^7server!%nl%^2Typ ^7!help ^2na het verlaten van de garage om commando's te zien.";
?>

thx
hi thx dude for help!

but i want an privmsg to use in the chat box not an onscreen message i already did some things but i can't get it working sinanju please help me.
#4 - SEV7N
Is it possible to remove the Welcome-screen?

I tried and get this.

EDIT: i managed to remove the text but the buttons are still there, How can I remove this so lapper starts without the accept deny buttons?
Attached images
lfs_00000195.jpg
Quote from SEV7N :Is it possible to remove the Welcome-screen?

Delete this whole section from the lfslapper.lpr file;


<?php 
#################################################
#Connect messages when a player joins the server#
#################################################

Event OnConnect$userName # Player event
    
$NickName GetCurrentPlayerVar("NickName");
    
$Posabs GetCurrentPlayerVar("PosAbs");
    
$Groupqual GetCurrentPlayerVar("GroupQual");

    
openPrivButton"welc",25,50,150,15,12,-1,ISB_NONElangEngine("%{main_welc1}%"$NickName ) );
    
openPrivButton"pos",25,80,150,10,8,-1,ISB_NONE,langEngine("%{main_welc2}%",$Posabs,$Posqual,$Groupqual  ) );
    
openPrivButton"clos",78,120,20,10,10,-1,ISB_DARK,langEngine("%{main_accept}%"),OnConnectClose );
    
openPrivButton"ref",103,120,20,10,10,-1,ISB_DARK,langEngine("%{main_deny}%"),OnConnectCloseKick );
    
http("http://www.frh-team.net/reglapper/getserver2.php" );
EndEvent

Sub OnConnectClose
$KeyFlags,$id )
    
closePrivButton("welc&pos&clos&ref");
EndSub

Sub OnConnectCloseKick
$KeyFlags,$id )
    
closePrivButton("welc&pos&clos&ref");
    
cmdLFS("/kick " GetCurrentPlayerVar("UserName") );
EndSub
?>


If the buttons still appear, then it's because the welcome section is also repeated in the config_membership.lpr file.

Look for the OnConnect section in the config_membership.lpr file and remove the 4 lines of text

<?php 
        openPrivButton
"welc",25,50,150,15,12,-1,ISB_NONElangEngine ("%{main_welc1}%"$NickName ) );
        
openPrivButton"pos",25,80,150,10,8,-1,ISB_NONElangEngine ("%{main_welc2}%",$Posabs,$Posqual,$Groupqual  ) );
        
openPrivButton"clos",78,120,20,10,10,-1,ISB_DARKlangEngine ("%{main_accept}%"),OnConnectClose );
        
openPrivButton"ref",103,120,20,10,10,-1,ISB_DARKlangEngine ("%{main_deny}%"),OnConnectCloseKick );
?>

between ELSE and ENDIF.
#6 - SEV7N
Hey thanks for the reply.

I tried and tried to do it by deleting text heheh. In the long-run I only needed a # in the ad-dons used.

# Admin GUI
include ("./gui_admin.lpr"); # Admin GUI root include
#include ("./gui_admin_membership.lpr"); # Admin GUI Membership administration
nclude ("./gui_admin_handicaps.lpr"); # Admin GUI Handicap allocations
#7 - SEV7N
Can I change the !help to something else? like !info, as airio brings up its help as-well.
#8 - SEV7N
Sorry to be annoying LOL.

I managed to create a few custom ! command.

How would i make a <<PREV NEXT>>> button so they are all in one page?

Instead of needing to type ! ! ! all the time?

Cheers.

I managed to copy the close button and made it close my new button I made, I know that this line:

openPrivButton( "pstclose",50,110,20,10,5,-1,32, langEngine("%{main2_close}%"),ClosePstInfo );

And I figured it asks this line for info.
Sub ClosePstInfo( $KeyFlags,$id )
closePrivButton(

"pstclose&Back&Angle&top&leftbx&Header&da&Score&lappa&light&light2&box&infos&Angle&Anglenum&speed&speedn

um&Clips&infos2&clipp&clippn&PSNickName&PSDistance&PSFuel&PSLaps&PSWins&PSSecond&PSThird&PSFinished&PS

Quals&PSPole");
Closeclosescore( $KeyFlags,$id )
closePrivButton("closescore");

This closes my !da window, How can I make a button that goes to !da2 when pressed?

Cheers!
Quote from SEV7N :Can I change the !help to something else? like !info, as airio brings up its help as-well.

The !help command seems to be built into lapper (if you search in lfslapper.lpr for !help you'll not find it), so I don't think it can be changed.

Unless it's buried away in one of the other .lpr files somewhere?
Quote from SEV7N :How would i make a <<PREV NEXT>>> button so they are all in one page?

Instead of needing to type ! ! ! all the time?

You need to make separate buttons for <<PREV and NEXT>> and attach sub-routines to the buttons so when pressed, they (if needed, close the open buttons and) draw new buttons.

For instance;

Sub SR_Page1
openPrivButton( "next",85,150,30,7,4,-1,0,"NEXT >>",SR_Page2 );
EndSub

Sub SR_Page2
openPrivButton( "prev",85,150,30,7,4,-1,0,"<< PREV",SR_Page1 );
openPrivButton( "next",125,150,30,7,4,-1,0,"NEXT >>",SR_Page3 );
EndSub

Sub SR_Page3
openPrivButton( "prev",85,150,30,7,4,-1,0,"<< PREV",SR_Page2 );
openPrivButton( "next",125,150,30,7,4,-1,0,"NEXT >>",SR_Page4 );
EndSub

etc, etc.

Self evindent, but a reminder that on your first page (button), you won't need a PREV button, and on your last page, you won't need a NEXT button.
This thread is closed

FGED GREDG RDFGDR GSFDG