The online racing simulator
lfslapper create files
is there a way for lfslapper to make .txt files... i was thinking of a login sys that goes by your username and it stores a username (does not have to be your lfs username) and password?if so how would i make it create files

kinda like how it makes the .dbs files

i was also wondering if there was a way for it to check the directory to see if the file exist

kinda like how cruise insim works
#2 - Krayy
Well the code I put up for writing out usergroups would do it, but why would you want to store passwords too?
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
#4 - Krayy
Quote from Fire_optikz001 :im thinking of a new kind of login sys and ur thing does not crate files:S

Explain how you system would work and I'll see what I can do.
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
#6 - Krayy
Quote from Fire_optikz001 :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

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?
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
#8 - Krayy
Quote from Fire_optikz001 :actually its to help keep relatives from using your account and it is also part of my user report sys

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

a waht?
Quote from Fire_optikz001 :a waht?

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
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
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
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
    ...
?>


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
I was thinking about this problem overnight, and I think what we'l do with our website/lapper integration is to use the "http" lapper function. This sends an http request to a web server and returns the result. The good news here is that you can pass a set of parameters to a cgi function using something like:

http("http://www.lfsnz.com?user=$userName");

and use the return value as the authorisation code. We're looking at scheduling races and using race codes to identify a series that the user will race in, so the modified call would be:
http("http://www.lfsnz.com?user=$userName&raceseries=$currSeries");

Then it will return a yes or no based on whether the racer is allowed to join that series

FGED GREDG RDFGDR GSFDG