The online racing simulator
Searching in All forums
(25 results)
lgrhacking
S3 licensed
Thanks - problem now is that the welcome message is no longer appearing. Is this being stored hence not showing to users that have already accepted?

Feel free to connect to - LED Racing - and give a chat or something? see what our new problem is -.-
LFS Lapper welcome message
lgrhacking
S3 licensed
Ok - so when somebody joins the LFSLapper server, the "Event OnConnect" displays the welcome message. Well somebody could easily drive around with the message open and hit people. Anyways we are using the 'accept' button to add the person into our online database. How can we make it so if the message is still visible (have not accepted yet) and they start driving (unitspeed?) then they will automatically get spectates??

Thanks!
Server
lgrhacking
S3 licensed
Just purchased a server! Looking forward to using it!
lgrhacking
S3 licensed
Your name: Louis Hacking
In case you win, do you want us to contact you by e-mail or LFSForums? e-mail
E-mail ( if applicable ): lgrhacking[at]me[dot]com
Chosen Number (0-99) 81
lgrhacking
S3 licensed
We have tried to do it through $_SERVER['REMOTE_ADDR']; But that returns us with the server IP, so the script must be running server side? not client side
lgrhacking
S3 licensed
Is there an IP player variable?
lgrhacking
S3 licensed
We have used http("http://website.com/registerPlayer.php&id=" . $userName ); to do the script for example
http://website.com/registerPlayer.php?id=gof[/color] this is the PHP we have, but it doesn't work?
Quote :<?php
$id = $_GET['id'];

include("config.php");

$query = mysql_query("SELECT * FROM racers WHERE license='$id'")or die(mysql_error());

if(mysql_num_rows($query)>=1){
//privMsg("^7User already exists.");
return;
}
else{

mysql_query("INSERT INTO racers (id, license) VALUES('', '$id' ) ") or die(mysql_error());

//privMsg("^7User has been added.");
}
?>

Fix: http("http://website.com/registerPlayer.php&id=".$userName );
Last edited by lgrhacking, . Reason : Fixed :)
lgrhacking
S3 licensed
wow! thanks! give me a bell when its released?
Pitboard query
lgrhacking
S3 licensed
Ok, using the code OnNewPlayerJoin_Pitboard(); to start Pitboard
and close_pitboard( $KeyFlags ); to close pit board.
When the close pit board code is activated (manually), upon passing Split1 the split one table area still loads? Any help?
+++++++++++++++++++++++++++++
LFSLapper Noob - Im Learning )
lgrhacking
S3 licensed
Thanks!
lgrhacking
S3 licensed
Thanks! I have used the following to close them all and they work perfectly
Quote :Event OnRaceEnd( ) # Lapper event generated when server returns to main menu, ending the race (SHIFT-X vote)
$mList = GetListOfPlayers("N");
$mCount = arrayCount( $mList );
$plyNum=0;

WHILE ($plyNum < $mCount)
$uName = $mList[$plyNum];
closeButton( $uName,"logo&info" );
closeButtonRegex ($uName, "rcm_*");
closeButtonRegex ($uName, "pitboard_*");
$plyNum=$plyNum+1;
ENDWHILE
EndEvent

New Problem:
How do i open them again? the Events onnewplayerjoin, onracestart, onqualstart and onpracstart, do not open the windows as soon as you join / do one of those events. I have to pit then join again? Thanks!!! Great Work!

edit:
the code to reopen:
Quote :openPrivButton( "logo",0,142,32,13,12,-1,32, langEngine("%{main_logo}%") );
openPrivButton( "info",140,0,24,9,12,-1,32,langEngine("%{main_info}%") );
OnNewPlayerJoin_Pitboard();

racecontrol.lpr - Flag Extra
lgrhacking
S3 licensed
Just a little thing that i thought i would share for LFSLapper's Race Control -

The concept - When Admin's are driving, it is annoying to open the whole RCM to put up a blue flag, so here are 6 Buttons to do it for you on the right of your screen.

Add the following in Sub DoRcm, then the IF Statement a few lines down.

/*FLAGS*/
openPrivButton( "rcm_fyellow",195,75,5,7,6,-1,32, langEngine( "%{rcm_fy}%"),DoRCyellowflag );
openPrivButton( "rcm_fred",190,75,5,7,6,-1,32, langEngine( "%{rcm_fr}%"),DoRCredflag );
openPrivButton( "rcm_fgreen",195,82,5,7,6,-1,32, langEngine( "%{rcm_fg}%"),DoRCgreenflag );
openPrivButton( "rcm_fblack",190,82,5,7,6,-1,32, langEngine( "%{rcm_fb}%"),DoRCblackflag );
openPrivButton( "rcm_fblue",195,89,5,7,6,-1,32, langEngine( "%{rcm_fbl}%"),DoRCblueflag );
openPrivButton( "rcm_fcheck",190,89,5,7,6,-1,32, langEngine( "%{rcm_fch}%"),DoRCcheqflag );


and in the language area:
rcm_fy = "^3Y";
rcm_fr = "^1R";
rcm_fg = "^2G";
rcm_fb = "^0B";
rcm_fbl = "^4BL";
rcm_fch = "^7C^0H";
lgrhacking
S3 licensed
The problem is that i need them to hide when people do /end or Shift+X, otherwise no options show on the new race page and I cant see what racers are on grid
lgrhacking
S3 licensed
I have tried all 3, neither of them work? :L
lgrhacking
S3 licensed
Now that problem is solved, how about the original -

I have this code but it doesn't work

Quote :Event OnNewPlayerJoin( $userName ) # Player event
openPrivButton( "logo",0,162,32,15,12,-1,32, langEngine("%{main_logo}%" ) );
EndEvent

Event OnRaceEnd( )
closePrivButton( "logo" );
EndEvent

lgrhacking
S3 licensed
Nevermind, got it, Thanks for the help! Let us know if you do any major updates?
lgrhacking
S3 licensed
I mean, i want to set these defaults for all users?
lgrhacking
S3 licensed
Ahh Thank you, will install that, what line is the config on for changing the coords and config settings in the new file?
lgrhacking
S3 licensed
Event OnNewPlayerJoin
openPrivButton( "logo",0,150,30,15,12,-1,16, langEngine("%{main_logo}%" ) );
EndEvent

Event OnRaceEnd( )
closePrivButton( "logo");
EndEvent

Ok, would this work? - I am new to insim and LFSLapper, great work by the way!


Ok, just had a try using the following code, but it doesn't work for some reason?

Quote :Event OnNewPlayerJoin( $userName ) # Player event
openPrivButton( "logo",0,162,32,15,12,-1,32, langEngine("%{main_logo}%" ) );
EndEvent

Event OnRaceEnd( )
closePrivButton( "logo" );
EndEvent

/////////////////////////////////////////////////////////////////////////////////////////////////////////
I am also doing some editing on the PitBoard, i have changed the original co-ordinates for the pitboard and my aim is to remove the config page at the start. Is there a shortcut to go in OnNewPlayerJoin, to make it load, and one to go in the OnRaceEnd of course Thankss so much, been looking ages for it, there are close ones but no open ones. Thanks
Last edited by lgrhacking, . Reason : Tested
lgrhacking
S3 licensed
Ok, so i am going to need two, an Open and a Close for the privbutton.

Is there an event for when a person is in their car, and when they are not? if not then i can do an IF?
lgrhacking
S3 licensed
Ok Thanks!
lgrhacking
S3 licensed
Quote from Bass-Driver :with Shift+I you remove every insim button.

Is there any way to hide it when it is in the END race menu? and show only when driving and outside of the pits?
[Solved] Insim button load problem
lgrhacking
S3 licensed
Ok so basically in:
Quote :Event OnNewPlayerJoin( $userName ) # Player event
EndEvent

I am putting in the following to add a logo in the bottom left:
Quote :openPrivButton( "logo",0,150,30,15,12,-1,16, langEngine("%{main_logo}%" ) );

The problem being that when you end the race it shows the logo part, but it doesn't show the racers menu's that would normally be there? Any help?

Thanks
Last edited by Bass-Driver, .
lgrhacking
S3 licensed
Yeah
Police Insim
lgrhacking
S3 licensed
Ok so i am looking for an Insim that will be used for COP training, so a cop feature, caution signs etc? siren above police. Just to train people to copping, anyone?

Thanks!!!
FGED GREDG RDFGDR GSFDG