The online racing simulator
Searching in All forums
(931 results)
Fire_optikz001
S2 licensed
Quote from Gai-Luron :parenthesis issue Tonum apply to GetCurrentPlayerVar, not to all statement, test on num not string not "1" but 1

IF(
ToNum( GetCurrentPlayerVar( "Cash" )) - $Price[toupper($argv)] >= 1 )


i just changed "1" to 1 and it worked fine :P

wouldnt it be easier for u to use [php]?
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
i need to find a way so that when a user gos to buy a car it make sure he still has more then $1 after buying it if he does not have more then 1 then it wont let him buy it... what i have atm is

<?php 
                    
IF( ToNumGetCurrentPlayerVar"Cash" ) - $Price[toupper($argv)] ) >= "1" )
                
THEN
                    privmsg
"You Just Bought The " toupper($argv) . " For " $Price[toupper($argv)] . "." );
                    
SetCurrentPlayerVar"Cash"ToNumGetCurrentPlayerVar"Cash" ) - $Price[toupper($argv)] ) );
                    
SetCurrentPlayerVar"HC_" toupper($argv), "1" );    
            
SetCurrentPlayerVar"HC"ToNumGetCurrentPlayerVar"HC") + ) );
                    
privMsg"You Now Have $" GetCurrentPlayerVar"Cash" ) );
           
                             ELSE
                              
privmsg"Not Enough Cash!");  
                ENDIF 
?>

but it does not work :P
LFSLapper Cruise Addon (Final Release)
Fire_optikz001
S2 licensed
NOTE: This Addon requires LFSLapper 6.0.1.1

Things i currently have on it are
  1. Refund And Force Fine System (Car Cash KM)
  2. Swear filter
  3. Showoff Function(show off your stats to everyone on server) (!Show)
  4. Driving Bonus
  5. Buy/Sell cars
  6. Bank
  7. Pit Fines
  8. Bank Interest
  9. Happy Hour
  10. Cop system
  11. And Much More!
Cruise Hud:


Police Hud:



More Details + Download
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from Gai-Luron :GlobalVar $price;

$price is one var with multiple index

Found that out if u would like to come test my cruise insim come to my server
Fire_optikz001
S2 licensed
Quote from Gai-Luron :$price["XFG"] = 1000;
$price["XRT"] = 2000;

WriteLine( "Price for XFG is " . $price["XFG"] );

ok so do i make 1 global var for $price or 1 for each $price["X"]
Fire_optikz001
S2 licensed
Quote from Gai-Luron :The big question is : What do you want to do????

$Price[500] = "This is one var";
$Price["MyVar"] = "This a other var";

WriteLine( $Price[500] ) ; // Display on console "This is one var"
WriteLine( $Price["MyVar"] ) ; // Display on console "This a other var"

Well i need to set up car prices for cruise insim
Fire_optikz001
S2 licensed
how many servers do u have with out the 3? i have about 7 :P
Fire_optikz001
S2 licensed
Quote from Gai-Luron :And array

$Price[$argv]

how i use that?
Fire_optikz001
S2 licensed
Quote from Gai-Luron :use global var

i cant cause i cant do $Price_ . $argv :P
Fire_optikz001
S2 licensed
ok im making prices and i was wondering if i could do
SetLapperVar( "Price_UF1", "2000" );
Fire_optikz001
S2 licensed
Quote from Gai-Luron :Hello,

You have an event when dist is done, then cumulate it and test with your own var $distToDo and then do action in GLScript, if i understand it's no need to have builtin LFSLapper var to do that.

You can save dist already done on disconnection of the player.

Gai-Luron

The problem im having is if i do this:

<?php 
        
IF( GetCurrentPlayerVar("TotDistMeter") == $distToDoRefund );
      
THEN
?>


lets say $distToDoRefund = 500
it will only refund 1 time which is why i need another event... unless there is a way to make it every 500m

nvm i know how i have to do it
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from Tim NL :You'r speaking in riddles .

ty? :homersimp

ALSO i need a event to finish cruise insim like $distToDo but i need it to do it every meter (or 100 meter) cause atm $distToDo is for driving bonus :P

maybe have $distToDoBonus and $distToDoReg
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
Quote from Gai-Luron :What is the scope of this option?

Please when you put a request, tell me why you want this. It's more easy to me to find a way to solve the request.

Thank's

well i have a clock and stuff in my info bar but if people dont want the info bar then they have the clock going and going which some people dont want :P
Fire_optikz001
S2 licensed
Player scheduled event

i was wondering if there is a way to have a normal scheduled event but players can choose weather they want it to be used there should be an option that a thing cant be deactivated maybe a way to turn off a event for a certain player like when u join there will be a thing after u click accept that says scheduled events

event 1 [ON] [OFF]
event 2 [ON] [OFF]
event 3 [ON] [OFF]
[OK]

and so on
Fire_optikz001
S2 licensed
Gai to make things easier could u possibly put a link in ur post for the updates?
Fire_optikz001
S2 licensed
Quote from Tim NL :Hi Gai,
I found a other bug in lapper version 5.910.

If $DefaultTopCar = "XFG"; ( one single car) then no problems but when set to multiple cars like If $DefaultTopCar = "XFG+XRG"; lapper goes in standby mode
The following error appear in the error file.

10-12-2009 21:38:55 -> Error on web command
-----------------------------------------------------------------------------
12/10/2009 9:38:55 PM
Lapper Instance 127.0.0.1/29997 abort!
Object reference not set to an instance of an object.
LFSLapper
at LFSLapper.LFSClient.GetVarPlayer(unionVal val, String idVar, String userName) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\GLSPlayerVars.cs:line 323
at LFSLapper.LFSClient.CBget(String id, String userName) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\GLSPlayerVars.cs:line 214
at GLScript.SetOfVars.Get(String id) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\SetOfVars.cs:line 154
at LFSLapper.LFSClient.GetVarPlayer(unionVal val, String idVar, String userName) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\GLSPlayerVars.cs:line 729
at LFSLapper.LFSClient.getcurrentplayervar(unionVal val, ArrayList args) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\scriptFunctions.cs:line 576
at GLScript.GLApp.parseBackcall(SetOfVars GVAR, SetOfVars LVAR, unionVal val, ArrayList args) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 1288
at GLScript.Parseur.getval(SetOfVars GVAR, SetOfVars LVAR, executeParsedFunction BC) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\ParseExpr.cs:line 539
at GLScript.Parseur.getval(SetOfVars GVAR, SetOfVars LVAR, executeParsedFunction BC) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\ParseExpr.cs:line 550
at GLScript.GLApp.retrieveEvalVar(String funcName, TokenParse tkparse, TokenBuffer currTokenBuffer, SetOfVars GVAR, SetOfVars LVAR, Boolean breakFunc, Char& breakCar) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 1030
at GLScript.GLApp.privExecuteTokensPart(Int32 level, String funcName, SetOfVars GCAR, SetOfVars LVAR, Boolean breakable, Boolean inSwitchCase, Int32 start, Int32 end) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 253
at GLScript.GLApp.privExecuteFunction(String funcName, String[] argsVals) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 173
at GLScript.GLApp.executeFunction(String funcName, String[] argsVals) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\GLScript\GLScript.cs:line 144
at Configurator.lexConfigurator.executeFunction(String funcName, infoPlayer pcurrInfoPlayer, String[] par) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\cfgParser\readCfg.cs:line 346
at LFSLapper.LFSClient.managePacket(NCN newConnection) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\managePacket.cs:line 73
at LFSLapper.LFSClient.Loop(Connect insimConnection) in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\loop.cs:line 1028
at LFSLapper.LFSClient.doloop() in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSClient\lfsclient.cs:line 551
at LFSLapper.LFSListen.Listen.goWorkMode() in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSListen\Listen.cs:line 85
at LFSLapper.LFSListen.Listen.start() in D:\Dev\DevInsim\lapper\LFSLapper\LFSLapper\src\LFSListen\Listen.cs:line 126
Void GetVarPlayer(GLScript.unionVal, System.String, System.String)
Closing Instance...
-----------------------------------------------------------------------------


i use 9.10 and dont have this ihave it set to all cars also :P
Fire_optikz001
S2 licensed
and now? XD old thread but ye really what is the status now (or did u decide not to do it anymore?)
Fire_optikz001
S2 licensed
Quote from zeugnimod :Eh... the devs didn't "add" cruise.

The devs gave users the opportunity to create insim applications and some users used that to make "cruise servers".

"Cruising" isn't an official feature of LFS.

i ment the /cruise >.>
Fire_optikz001
S2 licensed
i on the other hand love the idea as cruising is coming more and more popular, this is a racing simulator then why would the devs add cruise?
Fire_optikz001
S2 licensed
Quote from Andy King :Hi Gai, can you take a look at Lapper backing up its own Database please, also is it possible to have a new Event so if a driver types a !command thats not recognised by Lapper then they get a message back saying INVALID COMMAND - TYPE !help FOR ALL COMMANDS like FIRE created.

Thanks

that would be default


<?php 
                               
DEFAULT:
  
$NotCommand StrLen"!" );
   
$NotCommandStrip substr$text,0,$NotCommand );    
             
   IF( 
$NotCommandStrip == "!" )
   
THEN
                                privMsg
"^1Invalid Command! ^7Please Look At ^2!Help ^7For Commands!" );
   ENDIF
                            BREAK;  
?>

oh nvm :P
Fire_optikz001
S2 licensed
[SC] site?
Fire_optikz001
S2 licensed
I am starting the Cruise addon for LFSLapper today it has been going good so far i am currently putting areas and shops i still have the money and cars too add so with this i am looking for beta testers any one want to help?
Fire_optikz001
S2 licensed
in game or out of game?
Fire_optikz001
S2 licensed
Quote from Gai-Luron :Create a sub that do this

Sub myPm( $from, $to, $msg )

privMsg( $to,"PM from " . $from );
privMsg( $to,$msg );

privMsg( $from,"PM to " . $to );
privMsg( $from,$msg );

EndSub

Don't forget you can create your own command! if i want to limit command to builtin command, i never dev GLScript and sub

no i mean i tried that and it says that bye default :P

This is exactly my pm command


<?php 
        
CASE "!pm":
           IF( 
$argv != "" )   THEN
            $idxSpace 
indexOf$argv" ");
                                IF( 
$idxSpace != -THEN
            $toUser 
subStr$argv,0,$idxSpace );
            
$argv trimsubStr$argv,$idxSpace ) );
            
privMsg$toUser "^7" $argv );
  ELSE
             
privMsg "^7Command needs 2 paremters" );
 ENDIF
 ELSE
             
privMsg "^7Command needs 2 paremters" );
 ENDIF
 BREAK;
?>

and it says " you have received a private message from ..."

i just think it will look a lil better if it was "PM from ..."
Last edited by Fire_optikz001, .
Fire_optikz001
S2 licensed
i like how i can do this and it pm s the user i think it would be cleaner as "PM to: Me"
and "PM From: You"


<?php 
            privMsg
$toUser "^7" $argv ); 
?>

FGED GREDG RDFGDR GSFDG