The online racing simulator
k just another question

i cant ban a username with a space in it.
example: !ban lfs micha 1

is there a code to fix this??
Quote from Bass-Driver :k just another question

i cant ban a username with a space in it.
example: !ban lfs micha 1

is there a code to fix this??

u could do what i have to do... where ban brings up 2 openprivtextbuttons 1 is user 1 is length
Traffic Lights
Quote from Fire_optikz001 :how do i do special chars Like •?

I use a character like that in my traffic lights. See code below.

CASE "!traffic": #traffic lights!

openGlobalButton( "tl_bg",45,40,29,129,1,-1,32," ");
openGlobalButton( "tl_r",0,0,120,120,1,12,0,"^1•");
openGlobalButton( "tl_y",0,40,120,120,1,17,0,"^3•");
openGlobalButton( "tl_g",0,80,120,120,1,-1,0,"^2•");

BREAK;

Or you could do circles/dots

CASE "!dot": # coloured circles (dots)
openGlobalButton( "dot",0,0,200,200,1,17,0,"^0•");
openGlobalButton( "dot1",15,15,170,170,1,14,0,"^7•");
openGlobalButton( "dot2",25,25,150,150,1,11,0,"^1•");
openGlobalButton( "dot3",40,40,120,120,1,8,0,"^3•");
openGlobalButton( "dot4",50,50,100,100,1,5,0,"^2•");
openGlobalButton( "dot5",75,75,50,50,1,3,0,"•");
BREAK;

Probably a better way of doing it, because even making the left number a zero, the character starts quite a way in from left.

Maybe you could use the traffic lights in your cruise server!
Attached images
LFS Traffic Lights.PNG
Quote from sinanju :I use a character like that in my traffic lights. See code below.

CASE "!traffic": #traffic lights!

openGlobalButton( "tl_bg",45,40,29,129,1,-1,32," ");
openGlobalButton( "tl_r",0,0,120,120,1,12,0,"^1•");
openGlobalButton( "tl_y",0,40,120,120,1,17,0,"^3•");
openGlobalButton( "tl_g",0,80,120,120,1,-1,0,"^2•");

BREAK;

Or you could do circles/dots

CASE "!dot": # coloured circles (dots)
openGlobalButton( "dot",0,0,200,200,1,17,0,"^0•");
openGlobalButton( "dot1",15,15,170,170,1,14,0,"^7•");
openGlobalButton( "dot2",25,25,150,150,1,11,0,"^1•");
openGlobalButton( "dot3",40,40,120,120,1,8,0,"^3•");
openGlobalButton( "dot4",50,50,100,100,1,5,0,"^2•");
openGlobalButton( "dot5",75,75,50,50,1,3,0,"•");
BREAK;

Probably a better way of doing it, because even making the left number a zero, the character starts quite a way in from left.

Maybe you could use the traffic lights in your cruise server!

i get 3 Massive ?s
Quote from Fire_optikz001 :i get 3 Massive ?s

What editor are you using...it might be set to use a TTF font that does not include the std ASCII character set (like Arial).

Try using a different editor like Notepad++ or PSPad
Dot copied from a MS Word document and pasted directly into my LFSLapper.lpr file in PSPad.

Had a lot of problems at first, and sometimes, to make them work, had to put a blank line above and below, so instead of just

openGlobalButton( "tl_r",0,0,120,120,1,12,0,"^1•");

I would have

openGlobalButton( "tl_blanktop",0,0,5,5,1,12,0," ");
openGlobalButton( "tl_r",0,0,120,120,1,12,0,"^1•");
openGlobalButton( "tl_blankbottom",5,5,5,5,1,12,0," ");

Don't worry about the blanks, as they appear on different part of screen to dots.

Once they work, try taking the blanklines away. Hopefully, should now work.

Why this should be? Go figure!

You only need 1 set of "blanks" per CASE command, not per dot.

EDIT
Was thinking of using the no colour light gray and black dots of different sizes to appear on peoples screen during RallyX event, gradually getting more and more as the sectors/laps increase, to simulate mud on visor, with dots clearing on race end. Do you think that would be cool, or just extremely annoying?
Quote from sinanju :Dot copied from a MS Word document and pasted directly into my LFSLapper.lpr file in PSPad.

Had a lot of problems at first, and sometimes, to make them work, had to put a blank line above and below, so instead of just

openGlobalButton( "tl_r",0,0,120,120,1,12,0,"^1•");

I would have

openGlobalButton( "tl_blanktop",0,0,5,5,1,12,0," ");
openGlobalButton( "tl_r",0,0,120,120,1,12,0,"^1•");
openGlobalButton( "tl_blankbottom",5,5,5,5,1,12,0," ");

Don't worry about the blanks, as they appear on different part of screen to dots.

Once they work, try taking the blanklines away. Hopefully, should now work.

Why this should be? Go figure!

You only need 1 set of "blanks" per CASE command, not per dot.

EDIT
Was thinking of using the no colour light gray and black dots of different sizes to appear on peoples screen during RallyX event, gradually getting more and more as the sectors/laps increase, to simulate mud on visor, with dots clearing on race end. Do you think that would be cool, or just extremely annoying?

still have a ?
Quote from Fire_optikz001 :still have a ?

Hi,

I had the same big ?s
I use PSPad and had the fomat still on ANSI , when i changed the format to UTF-8 and saved the script it was working .
Apologies for any confusion - I've played with PSPad text format settings few times now, and have no idea what it's text format is currently set for.

I must have got lucky!
Yes use PSPAD with UTF-8 support.

Menu <Format> -> UTF-8
-
(Fire_optikz001) DELETED by Fire_optikz001
is there a way to make lapper not consider a user disconnecting as leaving race?

like maybe


<?php 
Event OnLeaveRace
$userName$reason )  # Player event
IF ($reason == "0" THEN # 0 = spectate 1 = Disconnect
Do what ever
ENDIF
EndEvent
?>


or maybe something like this
None of my For Eachs are working :P like this for example:


<?php 
               
FOREACH( $maVar IN $News )
                 IF( 
$maVar["value"] != "" )    THEN
  privMsg
("^6News: ^7" $maVar["value"] );
  ENDIF                       
            ENDFOREACH 
?>

also i was wondering if there was a way to do a certain area of a array var like

<?php 
$Traffic
"A","Color",*]
?>

And id there was a way to set a var in a foreach
-
(Bass-Driver) DELETED by Bass-Driver : fixed
I have a weird/dumb question. I want to give the leader on lap 2 a drive through penalty (odd, I know) using lapper. I thought I could do it by adding a few conditions to the OnLap event.


Event OnLap() # Player event
# DT stuff follows
IF ( $Pos == "1")
THEN
IF ( $LapsDone == "2" )
THEN
cmdLFS( "/p_dt " . GetCurrentPlayerVar("Username") );
ENDIF
ENDIF
EndEvent


It doesn't seem to work. Can someone enlighten me?

Thanks
hi guys
i have made a votesystem with 2 options

yes , no , cancel

and one with 4 buttons


my problem is:
when i make a question with the 4 buttons. and i click on send so that the other users can vote.
when i click a button then it says:

User voted for : Option 1 (thats what i fill in one of the buttons)

if the other users clicked on that button it says:

User voted for :

I have made a global var already but it still doenst work.
Attached files
votesystem.rar - 1.9 KB - 239 views
-
(sinanju) DELETED by sinanju
Quote from Danke :I have a weird/dumb question. I want to give the leader on lap 2 a drive through penalty (odd, I know) using lapper. I thought I could do it by adding a few conditions to the OnLap event.


Event OnLap() # Player event
# DT stuff follows
IF ( $Pos == "1")
THEN
IF ( $LapsDone == "2" )
THEN
cmdLFS( "/p_dt " . GetCurrentPlayerVar("Username") );
ENDIF
ENDIF
EndEvent


It doesn't seem to work. Can someone enlighten me?

Thanks

Just a thought, but have you defined what $Pos is?

$Pos = GetCurrentPlayerVar("Pos");

Same for $LapsDone?
Thanks, I'll give it a shot.
Quote from Bass-Driver :hi guys
i have made a votesystem with 2 options

yes , no , cancel

and one with 4 buttons


my problem is:
when i make a question with the 4 buttons. and i click on send so that the other users can vote.
when i click a button then it says:

User voted for : Option 1 (thats what i fill in one of the buttons)

if the other users clicked on that button it says:

User voted for :

I have made a global var already but it still doenst work.


<?php 
Sub Option1 
$KeyFlags,$id  )
$userName GetCurrentPlayerVar("UserName");
cmdLFS("/msg ^7>" GetCurrentPlayerVar("NickName") . "^7 VOTED FOR : " $Question1 );
SetCurrentplayerVar"Vote2option1""" );
SetCurrentplayerVar"Vote2option2""" );
SetCurrentplayerVar"Vote2option3""" );
SetCurrentplayerVar"Vote2option4""" );
closePrivButton"votesysbtn1&votebtn11&votebtn21&votebtn31&votebtn41&votebtn51&voteoptbgd&votechcnl1");
EndSub

Sub Option2 
$KeyFlags,$id  )
cmdLFS("/msg ^7>" GetCurrentPlayerVar("NickName") . "^7 VOTED FOR : " $Question2);
SetCurrentplayerVar"Vote2option1""" );
SetCurrentplayerVar"Vote2option2""" );
SetCurrentplayerVar"Vote2option3""" );
SetCurrentplayerVar"Vote2option4""" );
closePrivButton"votesysbtn1&votebtn11&votebtn21&votebtn31&votebtn41&votebtn51&voteoptbgd&votechcnl&votechcnl1");
EndSub

Sub Option3 
$KeyFlags,$id  )
cmdLFS("/msg ^7>" GetCurrentPlayerVar("NickName") . "^7 VOTED FOR : " $Question3);
SetCurrentplayerVar"Vote2option1""" );
SetCurrentplayerVar"Vote2option2""" );
SetCurrentplayerVar"Vote2option3""" );
SetCurrentplayerVar"Vote2option4""" );
closePrivButton"votesysbtn1&votebtn11&votebtn21&votebtn31&votebtn41&votebtn51&voteoptbgd&votechcnl&votechcnl1");
EndSub

Sub Option4 
$KeyFlags,$id  )
cmdLFS("/msg ^7>" GetCurrentPlayerVar("NickName") . "^7 VOTED FOR : " $Question4);
SetCurrentplayerVar"Vote2option1""" );
SetCurrentplayerVar"Vote2option2""" );
SetCurrentplayerVar"Vote2option3""" );
SetCurrentplayerVar"Vote2option4""" );
closePrivButton"votesysbtn1&votebtn11&votebtn21&votebtn31&votebtn41&votebtn51&voteoptbgd&votechcnl&votechcnl1");
EndSub
?>


ye i have tried that before but it didnt work:S
so now i have try it again and it still does nothing
even my vote doesnt work anymore
Quote from sinanju :Just a thought, but have you defined what $Pos is?

$Pos = GetCurrentPlayerVar("Pos");

Same for $LapsDone?

That works, thanks! For some reason I was thinking those were pre-defined variables.
Hello,

There aren't predefined var in last LFSLapper version


Gai-Luron
Quote from Fire_optikz001 :

<?php 
Sub Option1 
$KeyFlags,$id  )
$userName GetCurrentPlayerVar("UserName");
cmdLFS("/msg ^7>" GetCurrentPlayerVar("NickName") . "^7 VOTED FOR : " $Question1 );
SetCurrentplayerVar"Vote2option1""" );
SetCurrentplayerVar"Vote2option2""" );
SetCurrentplayerVar"Vote2option3""" );
SetCurrentplayerVar"Vote2option4""" );
closePrivButton"votesysbtn1&votebtn11&votebtn21&votebtn31&votebtn41&votebtn51&voteoptbgd&votechcnl1");
EndSub
 
Sub Option2 
$KeyFlags,$id  )
cmdLFS("/msg ^7>" GetCurrentPlayerVar("NickName") . "^7 VOTED FOR : " $Question2);
SetCurrentplayerVar"Vote2option1""" );
SetCurrentplayerVar"Vote2option2""" );
SetCurrentplayerVar"Vote2option3""" );
SetCurrentplayerVar"Vote2option4""" );
closePrivButton"votesysbtn1&votebtn11&votebtn21&votebtn31&votebtn41&votebtn51&voteoptbgd&votechcnl&votechcnl1");
EndSub
 
Sub Option3 
$KeyFlags,$id  )
cmdLFS("/msg ^7>" GetCurrentPlayerVar("NickName") . "^7 VOTED FOR : " $Question3);
SetCurrentplayerVar"Vote2option1""" );
SetCurrentplayerVar"Vote2option2""" );
SetCurrentplayerVar"Vote2option3""" );
SetCurrentplayerVar"Vote2option4""" );
closePrivButton"votesysbtn1&votebtn11&votebtn21&votebtn31&votebtn41&votebtn51&voteoptbgd&votechcnl&votechcnl1");
EndSub
 
Sub Option4 
$KeyFlags,$id  )
cmdLFS("/msg ^7>" GetCurrentPlayerVar("NickName") . "^7 VOTED FOR : " $Question4);
SetCurrentplayerVar"Vote2option1""" );
SetCurrentplayerVar"Vote2option2""" );
SetCurrentplayerVar"Vote2option3""" );
SetCurrentplayerVar"Vote2option4""" );
closePrivButton"votesysbtn1&votebtn11&votebtn21&votebtn31&votebtn41&votebtn51&voteoptbgd&votechcnl&votechcnl1");
EndSub
?>



i have solved my bug
had to removed the SetCurrentplayerVar in each sub :S
Quote from Fire_optikz001 :is there a way to make lapper not consider a user disconnecting as leaving race?

like maybe


<?php 
Event OnLeaveRace
$userName$fact )  # Player event
IF ($fact == "0" THEN # 0 = spectate 1 = Disconnect
Do what ever
ENDIF
EndEvent
?>


or maybe something like this

Quote from Fire_optikz001 :None of my For Eachs are working :P like this for example:


<?php 
               
FOREACH( $maVar IN $News )
                 IF( 
$maVar["value"] != "" )    THEN
  privMsg
("^6News: ^7" $maVar["value"] );
  ENDIF                       
            ENDFOREACH 
?>

also i was wondering if there was a way to do a certain area of a array var like

<?php 
$Traffic
"A","Color",*]
?>

And id there was a way to set a var in a foreach

Bump :S
Quote from Yisc[NL] :New name can be anything you want but a name is already set in the default script. Make a copy of your original finals into the folder which is configured in your lapper script. Remove the .txt extention and fireup Lapper. Then it will automaticly convert the old files into the new database.

Hi, I'm trying to update my old Lapper to the last version but I need the pb values stored in old format PB.txt to be imported in the new .elp file.

Any help?
For a friend i'm writing a script (php based) to export in a mysql db the pbs.

Can someone attach here a big file in new format (.elp) ?

Thanks.
Quote from lysergic :Hi, I'm trying to update my old Lapper to the last version but I need the pb values stored in old format PB.txt to be imported in the new .elp file.

Any help?

Just take your old PB.txt file and copy it into the new Lapper/bin/<instance> directory (usually Lapper/bin/default) and rename it to match the database name entries in your Lapper.lpr file with ".txt" on the end. So if your lkapper file has:

<?php 
$GripDatabase 
"./GripPB"
$DriftDatabase "./DriftPB";
?>

Then rename the PB.txt file to "GripPB.txt", and your drift.txt file to "DriftPB.txt".

After you have done that, remove any *dbs files in your Lapper instance directory and restart lapper.
This thread is closed

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