The online racing simulator
Searching in All forums
(931 results)
Fire_optikz001
S2 licensed
"sorry i was looking up some stupid excuses"

why i bumped old thread idk
Fire_optikz001
S2 licensed
Quote from Krayy :UserGroupFromFile( "register", "./registered.txt" );

ye but how do i store the values :S
Fire_optikz001
S2 licensed
wow ok stig u do know when u try n join [SC] u can only be on 1 team right :P so who is gonna run such a big team when u leave?
Fire_optikz001
S2 licensed
ok but how do i set up store values aka register?

like what is the thing i dont need u to do the whole thing just that 1 line
Fire_optikz001
S2 licensed
Quote from Krayy :Oh, where to begin....

Firstly you are calling the UserInGroup function in both the !register and !login commands with no username. Instead of calling it like:
UserInGroup( "register" ,"Registered" )

you should probably be calling it like:
UserInGroup( "register",$UserName )

Next, in the LUser, LPass and LAPass subs, you are setting a global var to store the login/passwords which is a bit of a no-no in that anyone who runs the !login command while another is doing it might overwriet those values before they are finished with. If I were you, I would use the SetUserStoredValue and GetUserStoredValue functions to store those values in the local databse for easy retrieval later on. They can be cleared when the user logs out or disconnects, or leave them there for future reference. In fact, I would be inclined to stire them there permanently rather than trying to create a usergroup for passwords and writing it out to a text file. Syntax for those functions are:
SetUserStoredValue(LUser, $LUser);
SetUserStoredValue(LPass, $LPass);

Then they are in the storedvalues.dbs database and will be easily retreivable using:
$LUser = GetUserStoredValue(LUser);
$LPass = GetUserStoredValue(LPass);

PS: What is the LAPass setting meant to do?

well could u do it for me? im abit confused with that stuff

and my buf is in the admin part every thing else works and im also adding a part when 2 people cant login at the same time
[Solved] Logincode HELP
Fire_optikz001
S2 licensed
i think i might have a bug some where could some one help? it all works but the admin pass part any idea?

<?php 
                                           
CASE "!login":
                                   IF( 
UserInGroup"register" ,"Registered" ) == )
            
THEN
                     
IF( UserInGroup"admin",$userName ) == || UserInGroup"beta",$userName ) == 1)
        
THEN
                               openPrivTextButton
"LUser1",50,25,25,15,5,96,"Username","Username",50,LUser);
                
openPrivTextButton"LPass1",50,51,25,15,5,96,"Password","Password",30,LPass);
                
openPrivTextButton"LAPass",50,76,25,15,5,96,"Admin Password","Admin Password",30,LAPass);
                   
openPrivButton"Login",50,101,25,15,5,-1,96,"Login",Login);
                              ELSE
                              
openPrivTextButton"LUser",50,25,25,15,5,96,"Username","Username",30,LUser);
                
openPrivTextButton"LPass",50,51,25,15,5,96,"Password","Password",30,LPass);
                  
openPrivButton"Login",50,101,25,15,5,-1,96,"Login",Login);
                              ENDIF
          Else
                      
privMsg"^1Your Not Registered");
                      ENDIF
                      BREAK;
            
?>


<?php 
                               
CASE "!register":
                                   IF( 
UserInGroup"register" ,"Registered" ) != )
            
THEN
                               openPrivTextButton
"RUser",50,25,25,15,5,96,"Username","Username",30,User);
                
openPrivTextButton"RPass",50,51,25,15,5,96,"Password","Password",30,Pass);
                              
MoveUserToGroup"register" "Registered" );
          
SaveGroupToFile$userName"./../user/registered/" $userName ".txt" );
          Else
                      
privMsg"^1Already Registered");
                      ENDIF
                      BREAK;
            
?>


<?php 
Sub User
$User )
          
ClosePrivButton("RUser");
          
$userName GetCurrentPlayerVar("UserName");
                    
MoveUserToGroup"register"  "UserName = " $User );
          
SaveGroupToFile"register"  "./../user/registered/" $userName ".txt" );
          
RemoveUserFromGroup"register"  "UserName = " $User );
EndSub 
    
        Sub Pass
$Pass )
          
ClosePrivButton("RPass");
          
$userName GetCurrentPlayerVar("UserName");
                    
MoveUserToGroup"register"  "Password = " $Pass );
          
SaveGroupToFile"register"  "./../user/registered/" $userName ".txt" );
          
RemoveUserFromGroup"register" "Password = " $Pass );
EndSub

Sub LUser
$LUser )
        
GlobalVar $LUser1;
    
$LUser1 $LUser;
EndSub
    
        Sub LPass
$LPass )
        
GlobalVar $LPass1;
    
$LPass1 $LPass;
EndSub    
        Sub LAPass
$LAPass )
        
GlobalVar $LAPass1;
    
$LPass1 $LAPass;

EndSub

        Sub Login
$KeyFlags,$id )
                
$userName GetCurrentPlayerVar("UserName");
        
UserGroupFromFile"register""./../user/registered/" $userName ".txt" );
            IF( 
UserInGroup"register" "UserName = " $LUser1 ) == && UserInGroup"register" "Password = " $LPass1 ) == )
            
THEN
                           
IF( $LAPass1 == $AdminPass || $LAPass1 == $BetaPass )
      
THEN
        privMsg
"^2Thank you for logging in Admin");
        
MoveUserToGroup"tempadmin",$userName );
      ELSE
      IF( 
$LAPass1 == "" )
      
THEN
                                        closePrivButton
("LUser1");
                                  
closePrivButton("LPass1");
                           
privMsg"^2Thank You For Logging In"  );
                                        
closePrivButton("LAPass");
                              
closePrivButton("Login");
      ELSE
        
privMsg"^1Incorrect Admin Password");
      ENDIF
      ENDIF
            ELSE
               
privMsg"Incorrect UserName And/Or Password"  );
            ENDIF
EndSub
?>


Last edited by Bass-Driver, .
Fire_optikz001
S2 licensed
hmm my "team about to fail decorator" is going off
Fire_optikz001
S2 licensed
Quote from Tur8o :i get this

-----------------------------------------------------------------------------
9/20/2009 4:32:13 PM
Lapper Instance 127.0.0.1/17468 abort!
Object reference not set to an instance of an object.
LFSLapper
at LFSLapper.listPlayers.updateGap(Int32 PLID, Int32 split, lexConfigurator newCfg, Boolean modifyOnlyPos) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\Players\ListPlayers.cs:line 137
at LFSLapper.LFSClient.managePacket(MCI mci) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\managePacket.cs:line 717
at LFSLapper.LFSClient.Loop(Connect insimConnection) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\loop.cs:line 944
at LFSLapper.LFSClient.doloop() in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\lfsclient.cs:line 630
at LFSLapper.LFSListen.Listen.goWorkMode() in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSListen\Listen.cs:line 85
at LFSLapper.LFSListen.Listen.startStbMode() in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSListen\Listen.cs:line 270
Void updateGap(Int32, Int32, Configurator.lexConfigurator, Boolean)
Closing Instance...
-----------------------------------------------------------------------------


bug in ur lpr :S least thats what i get when i have a bug
Fire_optikz001
S2 licensed
Version 10.0 drift/race Insim
added more options to Race settings have been added (!RS... see below)
minor GUI fixes

Race Settings
User Can select
Car
Laps
Track
Restrictions

+ working on spectating users on car selection

Server update

servers still down (will hopefully be back by end of this week)

Site Update

added a news section to forums
Last edited by Fire_optikz001, .
spec all Drivers
Fire_optikz001
S2 licensed
how do u spec every user on track?
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from Krayy :In the main Lapper config file. Search the file to find the sample lines that are alreay in there.

ok i think i got what ur sayin
Fire_optikz001
S2 licensed
i thought u said i could do it with

<?php 
$HandicapCars 
"$car:$mass:$intake"
?>

if i can where do i put that line?
Fire_optikz001
S2 licensed
Quote from Krayy :Yep

ok so would i put that on race start or what?

or right when the user selects it
Fire_optikz001
S2 licensed
Quote from Krayy :Unfortunately I think you're trying to overcomplicate things. Like I said before, only the registed user will have the login name, and if their relatives are racing, I wouldn't care much.

If you are after stopping unauthorised racers, then add registered users to a file called "RegisteredUsers.txt", then modify the OnConnect function like this:


<?php 
Event OnConnect
() # Player event
    
UserGroupFromFile"RegisteredUsers""./RegisteredUsers.txt" );
    IF( 
UserInGroup"RegisteredUsers",GetCurrentPlayerVar("UserName") ) != )
    
THEN
        privMsg 
("You are not authorised to race on this server );
        cmdLFS ( "
/kick " . GetCurrentPlayerVar("UserName") );
    ENDIF
    ...
?>



i already have this but i know how im gonna do it
Fire_optikz001
S2 licensed
darn well i got another way
maybe
i will find out when i get home
Fire_optikz001
S2 licensed
i was thinking of a nother way like
case"!login"
openprivtextbutton...
Break;
Sub login( $Login )
Globalvar ect
endsub

but ye i will also release this so ye thans but if i ever find hout how to use the .dbs then ill try and start using that
Fire_optikz001
S2 licensed
Quote from Krayy :Like this:

krayy,mypass,blah

then use the split function to access the 3 diferent parts of the string using a comma to split on

ok if i did that then how would i do the !login?

and how would i view whats in it? like the reports
Fire_optikz001
S2 licensed
so if i wanted to use this for my race sys it would be...


<?php 
$HandicapCars 
"$car:$mass:$intake";

?>

?
Fire_optikz001
S2 licensed
Quote from Krayy :Then if you store the info as a comma delimited string, you could store in the storedvalues.db

a waht?
Fire_optikz001
S2 licensed
can u help me

9/17/2009 9:12:17 PM -> Unexpected end function in event :MA_KB1 on file : "LFSLapper.SC" at line #1112

Sub MA_KB1()
openPrivButton( "2man212",52,130,5,25,1,12,32,"12");
openPrivButton( "2man212a",32,130,20,10,1,12,32,"12A");
DelayedCommand( 3, MA_KB2 );
EndSub

Sub MA_KB2()
openPrivButton( "2man212a",52,130,20,10,1,9,32,"12A");
DelayedCommand( 3, MA_KB3 );
EndSub

Sub MA_KB3 ( )
openPrivButton( "2man212a",52,130,20,10,1,14,32,"12A");
EndSub
Fire_optikz001
S2 licensed
Quote from Krayy :Hmmm...How would they log in using another username? LFS licensing takes care of that for you. I.e you can pretty much guarantee that anyone connecting to the server as "Krayy" is me, because LFS won't allow anyone else to use the name.

Is this for a system to report offenive behaviours or bad driving?

actually its to help keep relatives from using your account and it is also part of my user report sys
Fire_optikz001
S2 licensed
Quote from Krayy :Explain how you system would work and I'll see what I can do.

well i want it to make a $userName.txt

in it it will have
login = (User selected login)
Pass = (user selected password)
report = (user genarated report of !Report (username)[this would be The username on the txt file] (report)

something like this
the $username.txt is so people cant login to other people accounts
Fire_optikz001
S2 licensed
Quote from Krayy :In the main lapper file:


<?php 
#Syntax :
#
#$HandicapCarsTracks = "car/track:mass:irest,car/track:mass:irest,...,car/track:mass:irest";
#
#car : LFS short car name
#track : LFS short track name
#mass : mass handicap in kg
#irest : Air intake restriction in percent

$HandicapCars "UFR:0:30,XFR:0:30";

?>

So the last line in our lappr file puts a 30% restriction on UFRs and XFRs with no weight penalty. I'm looking at expanding my Handicapping code to include car restrictions too. Will let you know how I get on.

ye but i want it to be reset after the race so would i do $handicaps = " "?
Fire_optikz001
S2 licensed
Quote from Krayy :Well the code I put up for writing out usergroups would do it, but why would you want to store passwords too?

im thinking of a new kind of login sys and ur thing does not crate files:S
Fire_optikz001
S2 licensed
lol u will see
Last edited by Fire_optikz001, .
FGED GREDG RDFGDR GSFDG