The online racing simulator
Searching in All forums
(27 results)
1
bananas111
Demo licensed
If it possible I think I know how I can do it but can I make this message say not host but that who stop in that place
InSim.Send_MST_Message("!help");

Last edited by bananas111, .
bananas111
Demo licensed
Quote from kdo :
InSim.Send_MST_Message("/msg ^6|^7 " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].PlayerName + " ^3finish his job for €" + prize);

to
[COLOR=#000000][COLOR=#0000BB]InSim[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]Send_MTC_MessageToConnection[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]"message like [/COLOR][/COLOR]job finnished for for €" + prize[COLOR=#000000][COLOR=#DD0000]"[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]Conn[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]UniqueID[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]0[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]


Thanks,
But it's isn't work in current context. When I type it I got error
The name 'Conn' does not exist in the current context

bananas111
Demo licensed
Hi,
How to make this message to only that user who has done job?
InSim.Send_MST_Message("/msg ^6|^7 " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].PlayerName + " ^3finish his job for €" + prize);

bananas111
Demo licensed
Quote from bananas111 :I think I need to use something like that

<?php 
IF ( ToNumGetCurrentPlayerVar"KM" ) > 100)
        
THEN
        openPrivButton
"XRG",45,54,110,6,5,-1,32,strFormat"^7{0}",Format_Car_Cash_Needed"XRG" ) ),Buy_Car );
?>

but it didn't work

Can you help?
bananas111
Demo licensed
Quote from Yisc[NL] :No I won't.
When you have a clear goal of what you want to make, it is an excelent opportunity to start and learn coding your self.
I learned it when coding the pitboard.
Make some code, debug it and when you really get stuck, show us the code you have and we are happy to help.

I think I need to use something like that

<?php 
IF ( ToNumGetCurrentPlayerVar"KM" ) > 100)
        
THEN
        openPrivButton
"XRG",45,54,110,6,5,-1,32,strFormat"^7{0}",Format_Car_Cash_Needed"XRG" ) ),Buy_Car );
?>

but it didn't work
bananas111
Demo licensed
Quote from Yisc[NL] :Well here we go:

- declare a uservar on first connect, set it to 0 and store it in the database (new user)
- retrieve an already stored value from the database (already registered user)
- measure the distance driven and when a user disconnects, add it to the created/retrieved value and store that value into the database
- when distance driven is bigger then 50km, make a buy button for xfg available
- when distance driven is bigger then 200km, make a buy button for xrg available

Not too hard to code and certainly a very good way to learn a program like Lapper.

Can you make that code when bigger then 50km xfg is available. Next codes I make by me self. Thank's
bananas111
Demo licensed
Hi
I need to do something like that then I drived 50km I can buy xfg when I drived 200km I can drive xrg how I can do that?? I need simple code nothing else.
bananas111
Demo licensed
Quote from joordy599 :Well you can use it only if you are an S2 Licensed driver

it very bad :/
bananas111
Demo licensed
How get open track nodes?
bananas111
Demo licensed
Hi,
How make that when officer on duty show for him private button?
bananas111
Demo licensed
Hi,
How make that. Then chase start start timer with minutes and seconds?
bananas111
Demo licensed
Quote from Yisc[NL] :@LFSCruise and bananas111: you both keep asking questions and expecting help from people while doing nothing your self. This is no way to learn programming within Lapper. Create your own code, test it, discover the flaws, learn from them and then you will slowly get the hang of it. Start by making simple things, read the documention and create code to test what a a variable does under certain events.

The other thing is, why ask so many questions about creating a cruise mod while you are actualy posting in a thread of someone who already created a whole working cruise mod. Simply download the script, install it on your Lapper and your done. You can also use the code as future reference, so when you know enough about coding yourself, you can modify the script to your likings are start creating one yourself.

But please stop all the questions now and start to learn things on your own. If you really can't find why something isn't working, post the code you made, post all the thing you tried to make it working and then the more experienced people are more then willing to help you out or at least into the right direction.

@More experienced coders: don't answer these all these questions any more, unless they followed the learning curve as mentioned above and when presented with code created on their own in combination with all the solutions tried to make it working.

I reading docs but when I make script's it work but this script doesn't work and I don't found informacion how do it so please say how.
bananas111
Demo licensed
Hi,
1. How make a jobs?
2. How make this script to work?
openPrivButton( "Cruise_HUD3",50,0,100,5,5,-1,32, "strFormat( ^7Health: {0:0.00%}",GetCurrentPlayerVar( "Health" )
. "%nl%" . strFormat( "^7Bonus: {0:0.00%}",ToNum( GetCurrentPlayerVar("BonusMeter") / $Refund["dist"] ) );

bananas111
Demo licensed
Quote from sinanju :I use MS Word (sometimes Visio, sometimes Paint), then print them off. Depending on how intricate I want to make it, I sometimes scan stuff in, or download stuff from the internet.

If I want coloured licence, I copy document onto my pen drive, and use the colour printer at work (and hope I don't get caught!). If it's just b&W, I print it at home.

Last one I made was for my dog. Looks like a British Kennel license, but it's just a fake one. The dog's happy though, as she hasn't seen a real one to compare it to. I'm not intending to show it to anyone to try pass her off a thoroughbred breed, so I think it's ok.

No I'm talking about lfs licenses. Like a when I got a 20 license and 10k $ when I can buy xrg or when I got 1000 license and 100k $ when I buy fxr, understand?
bananas111
Demo licensed
Hi,
How make a licenses?
bananas111
Demo licensed
Hi,
Do lfs lapper have a jobs? Like a pizza bringer, hamburger bringer, pizza boy
bananas111
Demo licensed
Streets and speed zones work! thanks you
bananas111
Demo licensed
Quote from sinanju :Street Names
Find a node on a track you want the name to appear.

Then you need to make up a RegisterNodeAction with short track name, node number, and a sub-routine, e.g.


<?php 
    RegisterNodeAction
"SO2R" 84 SN_Odeon,"" );
?>

Then make up sub-routine that will show name, e.g.


<?php 
Sub SN_Odeon
$userName )
    
openPrivButton"location",2,20,24,6,2,4,96,"^7ODEON TURN -->");
EndSub
?>


This is what I use on my server to show the turn at the Odeon Cinema at South City, and shows for up to 4 seconds.

If you give another location the same button name, it will overwrite your original button, which can be good in this case as faster cars may be at next corner before name changes.

Speed Zone
Same as above, but add another button with a number and/or description in it, e.g.


<?php 
Sub SN_Odeon
$userName )
    
openPrivButton"location",2,20,24,6,2,4,96,"^7ODEON TURN -->");
    
openPrivButton"speed",2,30,24,6,2,4,96,"^140MPH");
EndSub
?>


To get the node number, drive to the bit of the track you want sign to appear, and type !node.

Assuming you're the admin, you will be shown the node number.

I don't understand node numbers can you help?
Last edited by bananas111, .
bananas111
Demo licensed
Hello,
How can I make a street's names and speed zone?
bananas111
Demo licensed
One question. Do this script work like traffic?
RegisterZoneAction( "Traffic" , "BL1", 36,402, 5 , RSA_green,"" );
RegisterZoneAction( "Traffic" , "BL1", 36,402, 5 , RSA_amber,"" );
RegisterZoneAction( "Traffic" , "BL1", 36,402, 5 , RSA_red,"" );

RegisterScheduleAction( "0 1 * * * * *", RSA_green );
RegisterScheduleAction( "20 1 * * * * *", RSA_amber );
RegisterScheduleAction( "40 0 * * * * *", RSA_red );

Sub RSA_green()
closeGlobalButton( "tlight_bg&tlight_bga&tlight_colour");
openGlobalButton( "tlight_bg",91,6,18,9,1,6,32," ");
openGlobalButton( "tlight_bga",91,6,18,9,1,6,32," ");
openGlobalButton( "tlight_colour",84,0,20,20,1,6,0,"^2•" );
EndSub

Sub RSA_amber()
closeGlobalButton( "tlight_bg&tlight_bga&tlight_colour");
openGlobalButton( "tlight_bg",91,6,18,9,1,6,32," ");
openGlobalButton( "tlight_bga",91,6,18,9,1,6,32," ");
openGlobalButton( "tlight_colour",84,0,20,20,1,6,0,"^3•" );
EndSub

Sub RSA_red()
closeGlobalButton( "tlight_bg&tlight_bga&tlight_colour");
openGlobalButton( "tlight_bg",91,6,18,9,1,6,32," ");
openGlobalButton( "tlight_bga",91,6,18,9,1,6,32," ");
openGlobalButton( "tlight_colour",84,0,20,20,1,6,0,"^1•" );
EndSub

bananas111
Demo licensed
Hello,
I try to do then I go to cordinates when timer start going but I don't understand how do that. This is my make script
Sub RSA_hi()
IF ( $Mode == "Cruise" )
THEN
IF ( GetCurrentPlayerVar( "IdZone" ) == "TOKO" )
THEN
privmsg( "^7Welcome to ^6" . GetCurrentPlayerVar( "IdZone") );
ENDIF
ENDIF
EndSub

But he don't work...
bananas111
Demo licensed
Hi,
How I can make a timer like /msg Hi and then 1min go /msg Hello.
bananas111
Demo licensed
Quote from Guthix :I wanna try to start coding InSim stuff. But i don't get sh*t of what the help manual stuff is saying XD so i wonder what file am i gonna start coding? Let's take the Lc insim as an example, if i wanna get a refund or change the name of it. Where do i do so?
I use the Visual Studio C# .
Let's say i want to both change name and add a refund function. Where do i do that?

Open Form1.cs or Cruise App.cs and edit what you need. If you don't found, your mod not editing.
bananas111
Demo licensed
t.y.
I have good script but in that script a little problem a distance bug. When COP stop distance stuck and don't move when he move distance unstuck like Distance:27 he stop and that civil what he follow can go away but distance don't move when COP move distance jump to 100 I don't understand that can you help? there script
$distToDo = 100;
CatchEvent OnDistDone( $userName ) # Player event
IF ( $Mode == "Cruise" )
THEN

SetCurrentPlayerVar( "Cash", ToNum( GetCurrentPlayerVar( "Cash" ) + ToNum( 0.05 * GetConfigVar( "distToDo" ) ) ) );

IF ( ToNum( GetCurrentPlayerVar( "Bank" ) ) < 250000 )
THEN
SetCurrentPlayerVar( "Bank", ToNum( GetCurrentPlayerVar( "Bank" ) + ToNum( GetCurrentPlayerVar( "Bank" ) * ToNum( 0.000001 * GetConfigVar( "distToDo" ) ) ) ) );
ENDIF

SetCurrentPlayerVar( "Health", ToNum( GetCurrentPlayerVar( "Health" ) - ToNum( 0.000008 * GetConfigVar( "distToDo" ) ) ) );

SetCurrentPlayerVar( "KM", ToNum( GetCurrentPlayerVar( "KM" ) + GetConfigVar( "distToDo" ) ) );

SetCurrentPlayerVar("BonusMeter", ToNum( GetCurrentPlayerVar("BonusMeter") + GetConfigVar( "distToDo" ) ) );
Cruise_HUD( $userName );
IF ( GetCurrentPlayerVar("Health") < "0.01" )
THEN
IF( $Cruise_HH != "Yes" ) THEN
globalMsg( langEngine( "%{cruise_fine_db}%", $userName,FormatCash($Fine["Docter"]) ) );
SetCurrentPlayerVar( "Cash", ToNum( GetCurrentPlayerVar( "Cash" ) - $Fine["Docter"] ) );
SetCurrentPlayerVar( "Health", "1" );
ENDIF
ENDIF

IF ( GetCurrentPlayerVar("TotDistMeter") >= ToNum( $Refund["dist"] * GetCurrentPlayerVar("Refund") ) )
THEN
SetCurrentPlayerVar("Refund", ToNum( GetCurrentPlayerVar("Refund") + 1 ) );
SetCurrentPlayerVar("BonusMeter", "0" );
globalMsg( strFormat( "^7{0} Recived {1:C} ^1Reason: ^7Distance bonus",$userName,$Refund["amount"] ) ) );
SetCurrentPlayerVar( "Cash", ToNum( GetCurrentPlayerVar( "Cash" ) + $Refund["amount"] ) );
ENDIF

IF ( GetCurrentPlayerVar( "Chase" ) == "1" ) THEN $argv = GetCurrentPlayerVar( "Chase" );
IF ( GetCurrentPlayerVar( "Chase_S" ) != "0" ) THEN
$Chase[$argv] = "^1-^4-^1-^4-^1-^4-^1-%nl%" . "Suspect: " . GetCurrentPlayerVar( "Chase" ) . "%nl%Cop: " . GetPlayerVar( GetCurrentPlayerVar( "Chase" ), "Chase" ) . "%nl%Distance: ".DistFromUser($userName,$argv)." Meters%nl%^4-^1-^4-^1-^4-^1-^4-" . "%at%" . "^4-^1-^4-^1-^4-^1-^4-%nl%" . "Suspect: " . GetCurrentPlayerVar( "Chase" ) . "%nl%Cop: " . GetPlayerVar( GetCurrentPlayerVar( "Chase" ), "Chase" ) . "%nl%Distance: ".DistFromUser($userName,$argv)." Meters%nl%^1-^4-^1-^4-^1-^4-^1-";
openPrivButton( "CopSys",160,15,35,5,5,-1,32, $Chase[$argv] );
ENDIF ENDIF

IF ( GetCurrentPlayerVar( "Chase_S" ) == "1" )
THEN
$argv = GetCurrentPlayerVar( "Chase" );
IF ( ToNum(DistFromUser($userName,$argv)) < ToNum("126") )
THEN
$Chase[$argv] = "^1-^4-^1-^4-^1-^4-^1-%nl%" . "Suspect: " . GetCurrentPlayerVar( "Chase" ) . "%nl%Cop: " . GetPlayerVar( GetCurrentPlayerVar( "Chase" ), "Chase" ) . "%nl%Distance: ".DistFromUser($userName,$argv)." Meters%nl%^4-^1-^4-^1-^4-^1-^4-" . "%at%" . "^4-^1-^4-^1-^4-^1-^4-%nl%" . "Suspect: " . GetCurrentPlayerVar( "Chase" ) . "%nl%Cop: " . GetPlayerVar( GetCurrentPlayerVar( "Chase" ), "Chase" ) . "%nl%Distance: ".DistFromUser($userName,$argv)." Meters%nl%^1-^4-^1-^4-^1-^4-^1-";

openButton( $argv, "CopSys",160,15,35,5,5,-1,32, $Chase[$argv] );
openPrivButton( "CopSys",160,15,35,5,5,-1,32, $Chase[$argv] );

IF ( ToNum(DistFromUser($userName,$argv)) < ToNum("6") )
THEN
globalMsg( langEngine( "%{cruise_chase_ca}%",$userName,$argv ) );

CloseButton( $argv, "CopSys" ); ClosePrivButton( "CopSys" );

SetPlayerVar( $argv, "Chase_S", "0" ); SetCurrentPlayerVar( "Chase_S", "0" );

SetPlayerVar( $argv, "Chase", "" ); SetCurrentPlayerVar( "Chase", "" );
SetPlayerVar( $argv, "Chase_Last", $userName );
IF ( GetPlayerVar( $argv,"Bank_Rob" ) != "" )
THEN
SetPlayerVar( $argv,"Bank_Rob", "" );
ENDIF

ENDIF
ELSE
globalMsg( langEngine( "%{cruise_chase_lc}%",$userName,$argv ) );

CloseButton( $argv, "CopSys" ); ClosePrivButton( "CopSys" );

SetPlayerVar( $argv, "Chase_S", "0" ); SetCurrentPlayerVar( "Chase_S", "0" );

SetPlayerVar( $argv, "Chase", "" ); SetCurrentPlayerVar( "Chase", "" );

ENDIF
ENDIF

UserGroupFromFile( "Police", $Dir["Police"] );

IF ( ToNum( GetCurrentPlayerVar( "KM" ) ) >= 1000000 )
THEN
IF ( UserInGroup( "Police",$userName ) != 1 )
THEN
MoveUserToGroup( "Police",$userName );
UserGroupToFile( "Police", $Dir["Police"] );
GlobalMsg( langEngine( "%{cruise_cop_new}%",$userName ) );
ENDIF
ENDIF
ENDIF
EndCatchEvent

Last edited by bananas111, .
bananas111
Demo licensed
Hi,
I found one bug. When police chasing my and I stop he don't bust my. Why and how fix it? Can I make a !bust command?
1
FGED GREDG RDFGDR GSFDG