The online racing simulator
Searching in All forums
(274 results)
Popughini
S3 licensed
You know I have a mistake that when using !jrr the car is not respawn
Popughini
S3 licensed
Quote from Bass-Driver :Here a small explaination how i did this:

1) Add a insim circle. When someone drives into that circle the following event will be executed.


Event OnCrossingChecker($userName,$Flags,$Time,$Object,$UserSpeed,$CircleIndex)
EndEvent

2) Created a globalvar ($CountPlayers for example) that will count the many players who entered the circle.
So for each player that will enter the circle +1.

IF ($CountPlayers == 1) THEN
#Blah
ENDIF

3) Use the joinrequest() function to spawn the players to the moon.

But in the demo version you can not add insim circles
Sorry for the disturbances
Popughini
S3 licensed
Quote from Yisc[NL] :No, the error means you are mishandling an array Smile

The code is the same as the one published by Bass-Driver


<?php 
CASE "!jrr":
            
privmsg("Test JoinRequest");
            
$X_Axis getcurrentplayervar("X");      #X axis SpawnPoint
            
$Y_Axis getcurrentplayervar("Y");      #Y axis SpawnPoint
            
$Z_Axis getcurrentplayervar("Z");      #Z axis SpawnPoint
            
$Flags 128;      #Move/Reset car (128) else (0)
            
$Heading 0;  #Heading of the players car at Spawnpoint
            
$UCID 0;       #Connection's unique id (0 = host)
            
$PLID getcurrentplayervar("PLID");  #Player's unique id
            
$JRRAction 4;
                
            
joinrequest($X_Axis $Y_Axis $Z_Axis $Flags ,$Heading $UCID $PLID ,$JRRAction); #Send Data to LFS
        
BREAK;
        CASE 
"!plicid":
          
privmsg("Your UCID: ".getcurrentplayervar("UCID"));
          
privmsg("Your PLID: ".getcurrentplayervar("PLID"));
        BREAK;
?>

Popughini
S3 licensed
I have the following error

6/21/2017 9:01:49 AM -> Syntax error in cfg file ".\default\SISTEMAS.lpr" at line #456
You can't change the dimension of an array... use unSet( $X_Axis ); before


Can it be something I deleted from LFSLapper.lpr?
Popughini
S3 licensed
Quote from Yisc[NL] :Well, that depends how you want to go about it.
If you want to send the first 4 people to a different location that reach that node, you can use a simple counter.
If the first person that reaches the node, triggers the action, you will need to find a way to pick out the other 3.
In case they are in a race, it would be easy to select the number 2,3 and 4 and re-locate them.
Maybe I am missing something, but all of the above seems relatively easy to accomplish with Lapper.

What I want is something similar to what has the "Drag Addon" of Bass-Driver that when there are 4 runners running and arrive for example to the node 188 the return to the 4 runners to different positions
Popughini
S3 licensed
Quote from Yisc[NL] :You can do that using RegisterNodeAction and then a Sub-routine to do the spawning.

But what you do not do is to read one user and then another, I want you to read 4 users and I sent each one to a different position
Popughini
S3 licensed
Good Bass-Driver, sorry for the inconvenience, but is there any way to make it when users go through node 188 to return them to a spawn zone? As in the Drag Addon that when 4 users go through X node it returns them to a different position to each one
Popughini
S3 licensed
Quote from Bass-Driver :First of all, you have to see who's an admin in the server.

You can do this with a foreach Loop


<?php 
$Players 
GetListOfPlayers("U");                  
        FOREACH( 
$Var IN $Players #For each player in the server
            
        
ENDFOREACH
?>

In that loop, you check if the current player in the loop in an admin.


<?php 
IF ( UserIsAdmin$Var["value"] ) == THEN

ENDIF
?>

To open button for a specific player in your current loop using the OpenButton() function.


<?php 
openButton
$Var["value"], "button",175,124,25,5,5,2,96,"");
?>

I see now that, adding the Ipaddress player var to LFSLapper was a bad choice. So many cracked players and i think legal players are using it. This could be a security issue :S I'm sorry for that.

But it was a insimpacket that was kinda easy to implement so yeah uhm.

Thanks bro I'll try it!
Popughini
S3 licensed
Quote from Bass-Driver :In the meantime you are waiting for the code, You should have done this by yourself.
These are just buttons. Easiest thing in Lapper.

And with using the search function on this lapperforum looking for "Marshall" you whould find a script with marshalls: https://www.lfs.net/forum/thread/65264

Edit: i will delete the my post and the post above soon, to clean the topic.

Many thanks ! I had it but I lost it when I formatted my pc

Thanks Bass-Driver, sinanju and Yisc [NL] helped me a lot with the things I needed!
Popughini
S3 licensed
Solved
Does not connect to main server
Popughini
S3 licensed
Hi I have a problem, today when trying to connect to my account I could not why the game receives me the connection with the master server, the strange thing is that from me another pc can connect correctly but from this it does not leave me ... I have already disabled The firewall to not have restrictions but likewise does not let me connect.

I hope to receive a help!

Thanks in advance
Popughini
S3 licensed
Would you have the Marshall's code please?

Popughini
S3 licensed
Good idea Yisc !
Get ip address
Popughini
S3 licensed
Is there any way that when a user enters the server the "administrator" is shown on a button the IP address of the new user that connects?

I try like this but I do not work


<?php 
Event OnConnect
$userName # Player event

    
obtenerIP$KeyFlags );
EndEvent
?>



<?php 
Sub obtenerIP
$KeyFlags )
IF ( 
UserIsAdmin$userName ) == )
THEN
openPrivButton
"base_obtenerIP1",4,80,32,6,4,3,23,"" );
openPrivButton"base_obtenerIP2",4,80,32,6,4,3,23,"" );
openPrivButton"base_obtenerIP3",4,80,32,6,4,3,23,"" );
openPrivButton"obtenerIP1",5,81,30,4,4,3,32,"" );
openPrivButton"obtenerIP2",5,81,30,4,4,3,32,"" );
openPrivButton"obtenerIP3",5,81,30,4,4,3,32,""GetCurrentPlayerVar "userName" ) . " ^6the IP address is^7: "GetCurrentPlayerVar "IPAddress" ),"" );
ENDIF
EndSub
?>


If someone could correct the code I would appreciate it
Popughini
S3 licensed
Quote from Bass-Driver :@Popughini

Here's an examplecode for display players speed, that i used in a another topic.
With the 2 commands you can control a loop inside a Sub



<?php 
###################################
#Event triggered when lapper start#
###################################
Event OnLapperStart()
    
Globalvar $Loop_On
        
$Loop_On 0;
EndEvent

#################
#Command actions#
#################
Event OnMSO$userName$text # Player event

    
$idxOfFirtsSpace indexOf$text" ");

    IF( 
$idxOfFirtsSpace == -THEN
      $command 
$text;
      
$argv "";
    ELSE
      
$command subStr$text,0,$idxOfFirtsSpace );
      
$argv trimsubStr$text,$idxOfFirtsSpace ) );
    ENDIF
    
    SWITCH( 
$command )

        CASE 
"!loopoff":
            
$Loop_On 0;
            
$Racers GetListOfPlayers("U");                  
            FOREACH( 
$Var IN $Racers )
                
closeButton$Var["value"], "speed");
            ENDFOREACH
        BREAK;
        
        CASE 
"!loopon":
            
$Loop_On 1;
            
globalmsg("execute sub Set_Loop()");
            
Set_Loop();
        BREAK;

    ENDSWITCH
EndEvent

Sub Set_Loop
()
    IF (
$Loop_On == 1THEN 
        $Racers 
GetListOfPlayers("U");                  
        FOREACH( 
$Var IN $Racers #For each player in the server
            
openButton$Var["value"], "speed",175,124,25,5,5,2,96,"^7" GetPlayerVar$Var["value"], "InstantSpeed") . " " GetPlayerVar$Var["value"], "UnitSpeed")."^8 (".GetPlayerVar$Var["value"], "Car").")");
            
DelayedCommand1Set_Loop); #1 second delay
        
ENDFOREACH
    ENDIF
EndSub

?>



But how can I make a button when I click to close a Sub?
New Function
Popughini
S3 licensed
Hello, I wanted to make a request and know if it could be done by Bass-Driver, the request would be if you can add a new one to a function similar to that of "ClosePrivButton" but that new function is "CloseSub" that would fulfill the same function as the Of "ClosePrivButton" function would disable a "Sub Event" not if I explain myself well ....

I hope this feature can be created because it would help close things with more fluidity than closing a button


SPANISH

Buenas quería hacer una petición y saber si podría ser realizada por Bass-Driver, la petición sería si se puede agregar una nueva a función parecida a la de "ClosePrivButton" pero que está nueva función sea "CloseSub" que cumpliría la misma función que la de "ClosePrivButton" la función sería desactivar un "Sub Evento" no se si me explico bien....

Espero se pueda crear esta función ya que ayudaría a cerrar cosas con mayor fluidez que cerrar de a 1 botón
Popughini
S3 licensed
I was told that the code is old and no longer works :/
Popughini
S3 licensed
Quote from Yisc[NL] :The answer you are looking for is in the releasenotes of the latest versions of Lapper:

NOTE: Since Version 7.0.4.4 contains changes for the RegisterNodeAction() & RegisterZoneAction() Sub Callbacks. The Sub callback requires now 2 values. See example below!!

RegisterNodeAction( TESTID, getLapperVar( "ShortTrackName" ) , getCurrentPlayerVar("CurrNode") , test,"" );

Sub test($UserName,$ZoneID)
privmsg("ID=".$ZoneID); #output is TESTID
EndSub


Why do you help a demo user using Crack to have S2 license for free?
Popughini
S3 licensed
It has several folders and files, to start it from the file I have to have ubuntu and use Windows
Popughini
S3 licensed
Thank you, I knew how to do it but as I left a little aside the LFSLapper I had forgotten!
[REQUEST]Script
Popughini
S3 licensed
Hi, I would like to ask if anyone could do a script like this:


Display current date, current time, and current track
Popughini
S3 licensed
Make a change is to sell?
Popughini
S3 licensed
They would have to add more colors to the list
[HELP]Compile Python InSim
Popughini
S3 licensed
Good, I come to ask you the following question ... can you compile this insim? How do I compile it?

I've never used python
[SEARCH]Programmer
Popughini
S3 licensed
Solved, I already got a kind person who will help me.
Last edited by Popughini, .
FGED GREDG RDFGDR GSFDG