The online racing simulator
Searching in All forums
(24 results)
IP Ban?? (URGENT)
MemoPedra
S2 licensed
How do I ban the ip of someone of my server?? its not rented from lfs.net
and the guy keep creating accounts and joining in, its really annoying.
MemoPedra
S2 licensed
Quote from sinanju :You are trying to do too much at once.

Do it one stage at a time, so you understand what is happening, and, more importantly, make it easier to change or fix if it doesn't work right.

Quote from MemoPedra :.. is there a way to "replace" the main_accept on the message self destruct or at the clickmessage, because now it doesnt show when someone log in, for example: "Robert a new visitor has logged in!" it only shows when i click at the accept button, so i just want to replace it to this i think
openPrivButton( "clickmessage",40,136,120,6,10,18,ISB_LIGHT,langEngine("%{main_clickmessage}%"),OnConnectCloseKick );

..

In the default lfslapper.lpr script, when someone connects, they get a welcome message with 2 buttons under the message. If the [ACCEPT] button is clicked, this does nothing BUT close the message and the buttons. If the [DENY] button is clicked, then the message and buttons are closed, AND the user will be kicked.

Because the timer is set to -1, the message will always stay on screen for the person that has connected, until they click either button.

The ACCEPT and DENY buttons are only triggers for starting a sub-routine when clicked. You could easily change these - for instance, you could change the wording, add a pop-up message when someone clicks on a button, change what they do - instead of just kicking someone if they click the DENY button, you could add a ban ( cmdLFS( "/ban " . $Username . " 30" )Wink, or add a message to say "I forgive you", and change the sub-routine at end of button code from "OnConnectCloseKick" to "OnConnectClose" (so both ACCEPT and DENY buttons do same thing). Or, for fun, reduce timer (eg -1 to 4) on DENY button sub to give new user only few seconds to hit button before it disappears, leaving only the ACCEPT button. Or, if you really wanted some serious fun, use the DelayedCommand code, then you could have the DENY button move around the screen every second or so.

What the buttons read, and what they do, is up to how you code them.

Your "clickmessage" button, which you have set to clear (self destruct!) in 18 seconds - if this is used in the 'Event OnConnect' section, and because its a private button, only the person joining should see this. So, if I understand correctly, why are you getting an ACCEPT button if someone else joins?

Best you show your whole OnConnect section (from Event to EndEvent), along with the relevant part of the language section. I can tell a lot about your "clickmessage" button - except what, if anything, it actually reads.

Because as i said the tiggered accept button is connected to this for example: "Robert a new visitor has logged in!" when someone press the accept button it will shows up a privmsg with that... it depends on the membertype at the command !ma so i need to connect that to the self destruct and clickmessage..
Well i think it is working well at the momment, thanks.
Last edited by MemoPedra, .
MemoPedra
S2 licensed
Quote from sinanju :In my 'welcome section', all my buttons now start with the prefix "welc_" with an identifier as suffix, as in 'welc_backing'.

This is so I can use the line
closeButtonRegex (GetCurrentPlayerVar("UserName"), "welc_*");

to close all the buttons without worrying about missing any, or closing the wrong one(s).

All buttons now changed from a time of -1 (never close unless a sub-routine closes them) to about 12 seconds or so, so that message will disappear off screen in not too much time without having to click any buttons. The timer is just to show when it will disappear - for anyone that even bothers to read what's on screen.

The timer uses the %cpt% function (look in the docs/changes.txt file).

The timer does nothing but show a countdown time. The buttons will disappear anyway.

Thanks.. is there a way to "replace" the main_accept on the message self destruct or at the clickmessage, because now it doesnt show when someone log in, for example: "Robert a new visitor has logged in!" it only shows when i click at the accept button, so i just want to replace it to this i think
openPrivButton( "clickmessage",40,136,120,6,10,18,ISB_LIGHT,langEngine("%{main_clickmessage}%"),OnConnectCloseKick );

and when the message self destruct too..
Well i found the code at the config_membership.lpr i think it is this:
Sub GetMemberType($userName)
$mType = GetUserStoredNum($userName,"MemberType");
IF ( $mType <= $MEMBERTYPE_UNKNOWN )
THEN
$mType = $MEMBERTYPE_VISITOR;
SetUserStoredValue("MemberType", $MEMBERTYPE_VISITOR);
ENDIF
IF ( $mType >= $MEMBERTYPE_MAX )
THEN
$mType = $MEMBERTYPE_MAX - 1;
SetUserStoredValue("MemberType", $mType);
ENDIF
$mName = $MemberTypes[$mType];
return($mName);
EndSub

Sub LoginMember($userName)
$NickName = GetPlayerVar($userName, "NickName");
privMsg ("^7Hi there, ^8" . $NickName);
globalMsg ($NickName . "^8 has ^2logged in");
# OnConnectClose_Pitboard();
EndSub

Sub LoginNonMember($userName)
$NickName = GetPlayerVar($userName, "NickName");
IF ( GetUserStoredNum("MemberType") < $MEMBERTYPE_VISITOR )
THEN
SetUserStoredValue("MemberType", $MEMBERTYPE_VISITOR);
privMsg ("^7Welcome ^8" . $NickName);
globalMsg ($NickName . "^8, a new ^6Visitor^8 has ^2logged in");
ELSE
privMsg ("^7Welcome back, ^8" . $NickName);
globalMsg ($NickName . "^8, a returning ^6" . GetMemberType($userName) . "^8 has ^2logged in");
ENDIF
EndSub

Now i need help to add that at the self destruct message and at the clickmessage..
Last edited by MemoPedra, .
MemoPedra
S2 licensed
Quote from sinanju :Look in the lfslapper.lpr file for 'main_welc1'. The first instance will be the code for the button, eg

openPrivButton( "welc",25,50,150,12,15,-1,ISB_NONE, langEngine("%{main_welc1}%", $NickName ) );

and the second instance will be in the language section - Lang "EN" - and will read something like

main_welc1 = "^7Welcome {0} ^7to this ^1LFSLapper ^7powered server !%nl%^2Type ^7!help ^2after leaving garage to see commands.";

Change the code in the language section to read what you like.

Language section code breakdown:
^7 is for white coloured text
{0} is for the drivers nickname
^1 red coloured text
%nl% is for new line - anything after this goes on next line - remember to put coloured text identifier (eg ^2) after, otherwise text will be gray

Different sized text just means that I've used different buttons, as in main_welc1, main_welc2, main_welc3, etc, and placed them one under another.

I'm flattered that you want to use my welcome message, but if you want to use lapper, then I'm not going to just give you the code - the welcome message is one of the very easiest things that you can change (was the very first thing I ever learned to do), and if you can change that, and make it look and work like you want, then that's a big step.

If you need help in what all the details (especially the numbers) mean in the code for making a button, then look at this POST.

Play around with the 'lite' version I made - you can even change the English to Portugese wording in the Lang "EN" section (this is the default for lapper to look in if no other languages specified), so you might change welc1 to

main_welc1 = "^7Bem-vindo a este servidor {0}%nl%^2escreva !help a ver comandos";

(Assuming google translate does what I asked!).

Thanks but i just want the countdown thing (self message destruct) with that OK button, and without kick anyone when the time finishes
MemoPedra
S2 licensed
Quote from sinanju :OK, I've made a sort of lfslapper.lpr lite file with little in it, except the welcome message - see attached file, which has been zipped down. Give it a try to see if it works.

1st image shows what should appear if you run lapper with this file.

This was run on my server, and image is screen dump when I joined. I didn't click anything, and when timer ran down, I was kicked off - so code works!

Thing is, people can agree to anything on front screen, and still do what they like when on the server - up to admins on server to try stop any bad behaviour.

For that reason, I have alternate message on my server, which I think is bit more friendly, but does advise what will happen if bad behavior is noted.

Can you attach the lpr file for this one?
MemoPedra
S2 licensed
Quote from sarxes :So it was rented from the LFS.net ?

Yes, but now i have a better host that supports lapper and it works fine 24/7.
[DD] DriftNDrag Team
MemoPedra
S2 licensed
Greetings racers


We are a Drift and Drag DEMO Team, we are running actually 3 servers with great service and configs, Main DriftNDrag, RallyCross, Tweak Server, 24/7.

What we are looking for?

We are looking for active players, with a good LFS Experience and Skills.

What do i need to do?

You have to fill out our form which is available at our website: http://driftndrag.tk/Join-Us/

Are you looking for admins?

Yes we are looking for experienced admins who can provide a good service, for more info contact us.

I have more questions...

If you have more questions, write it below

Best Regards,
The Team Leader,
Zayde.
Last edited by MemoPedra, . Reason : updated
MemoPedra
S2 licensed
Quote from Flame CZE :I had to enable "cruise" hosts in order to see it in the server list. Either click "ALL" in the bottom right, or click "CRU" in the top right to change its colour to black - that will add cruise hosts to the list. Remember to refresh the list afterwards.

I hope that helps.

Thanks, now i know why wasn't comming so much players because they have "RACE" marked as default option Tongue
MemoPedra
S2 licensed
Quote from Victor :
Quote from MemoPedra :Is there a way to change the name "Host" on a rented server?
I know in a dedicated server theres a line in the cfg with /player=Host and we can change it, but i've rented a server yesterday and im trying to change it... is there a command or anything else? i tried /player in the console but didnt worked.

I have added the 'Host player name' field on the 'Basic settings' tab.
You will have to shut down your host before you can edit that field though, and then start your host again.

Thanks, i really appreciate.
MemoPedra
S2 licensed
Quote from Flame CZE :Uhm, is the server status "RUNNING" or "STOPPED"?

It says RUNNING but some people cant see the server on the list, and me too... the name is [DD] DriftNDrag
Last edited by MemoPedra, .
Server not in the list anymore?
MemoPedra
S2 licensed
Hi

I've rented a LFS Server from here https://www.lfs.net/hosting few days ago, and at first, everything was going well but today the server stopped showing in the server list, i didn't changed any server cfg, just modified some scripts from lapper.. is not hidden.. is that normal or what could it be?
MemoPedra
S2 licensed
Quote from sarxes :Just write an e-mail to the server admins , I think they 'll help you for sure

this is a official server rented
MemoPedra
S2 licensed
Quote from sinanju :Drag system - you have to type !drag to enable.

Whisper messages - to do with RegisterScheduleAction events in the lfslapper.lpr file.

So long since I used this, I forget about how the timing works, but you have to set time for a sub to appear, e.g.

RegisterScheduleAction( "0 1 * * * * *", SA_timetest );

Sub SA_timetest
openGlobalButton( "timetest",25,40,150,10,10,8,32,"^1This is a Whisper test message%nl%^1Hopefully it worked!" );
globalRcm("^7This is a test of a Whisper message");
EndSub

I can't remember if "0 1 * * * * *" means every minute, or 1 minute past midnight every Sunday - you may have to play around with it.

I've specified, in the test, for 2 messages to appear - globally, as you want everyone to see them? First in a button in the high up vertically, middle of screen horizontally, with red coloured text, 2nd a global message in middle of screen (will look like a button) with white coloured text. Wording displayed will also tell you which is which. You likely only want one, but you can decide if you want button or broadcast message. Button you can place in a location of your choice, whereas message always appears in middle of screen (and can only be certain number of characters in message). You can play around with private and global buttons, private and global messages, and button/text colours as you want.

In the openGlobalButton line, the 8 in the line of numbers refers to the amount of seconds the message appears. Change to suit. If it was -1, it would mean the message never clears - unless you have another sub to close it.

Thanks for your reply.
I dont want want in a button or a command, i just want a message for advertising to appear on the chat(not in the middle of the screen) with a time.. its like the message that appears when LFSLapper opens: There are currently ... servers powered by ... but i want it to show minute by minute, preferably 1 or 2.. i tried that button though but didnt worked..

Oh and as i see the code is for the message type that i want is privMsg( "^7Actually, there are ^317^7 LFSLapper powered servers");

So i just need that privMsg code with a timing set.
Lapper connect problem
MemoPedra
S2 licensed
Lapper connect and disconect (appears the welcome message)

heres the log:

5/5/2015 7:15:17 PM
The target array is not long enough to copy all the items in the collection. Go to the contents and the length of the array.
mscorlib
em System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
em System.BitConverter.ToInt32(Byte[] value, Int32 startIndex)
em System.BitConverter.ToSingle(Byte[] value, Int32 startIndex)
em InSim.Decoder.pakGetFloat(Byte[] pak, Int32 first) em c:\LFSLapper6.014\src\InSim4.cs:line 920
em InSim.Decoder.STA..ctor(Byte[] packet) em c:\LFSLapper6.014\src\InSim4.cs:line 1159
em LFSLapper.LFSClient.Loop(Connect insimConnection) em c:\LFSLapper6.014\src\LFSClient\loop.cs:line 1089
em LFSLapper.LFSClient.doloop() em c:\LFSLapper6.014\src\LFSClient\lfsclient.cs:line 561
em LapperInstances.LapperInstance.doConnection() em c:\LFSLapper6.014\src\LFSInstances\LapperInstance.cs:line 247
Void ThrowArgumentException(System.ExceptionResource)
Closing Instance...
-----------------------------------------------------------------------------
Last edited by MemoPedra, .
MemoPedra
S2 licensed
Quote from sinanju :Find the lfslapper.lpr file, open with Notepad, or similar, and search for
Event OnConnect( $userName ) # Player event

To disable: You can either delete the things between Event/EndEvent, or put hash (#) in front of each line for lapper to ignore these lines.

To change: The buttons refer to 'main_welc1', 'main_welc2', etc. Look in the Language sections (English is in Lang "EN", French in Lang "FR", etc) for these names and change wording to suit.

You could even change the wording from English to Portuguese if you want Smile

Sweet, thanks.. and do you know how can i add a whisper message that appears minute per minute? i saw your video too with the drag system lights, tried it but the lights dont show up.. im really looking for one
MemoPedra
S2 licensed
Quote from sinanju :Added video to YouTube HERE to show drag system in action.

Can you update the script please? lights aren't working..
MemoPedra
S2 licensed
Quote from cargame.nl :He wants to change the in game server name. This doesn't work with a /command, it can only be specified in a setup file.

(which he apparently doesn't have access to).

Exacly.. yea i cant find a setup file in the panel, the unique setup there that can be used is for the app Airio i guess.. thanks for the info
MemoPedra
S2 licensed
Quote from sinanju :Look for a file called setup.cfg, open it, and you will see a line after // host name, usually;

/host=Host Name

Change to suit, eg;

/host=MemoPedra

Thats for the dedicated server as i said, thanks anyway
Disable or change the welcome message
MemoPedra
S2 licensed
How can i disable or change the welcome message??
MemoPedra
S2 licensed
Quote from sarxes :You can run it from a VPN ofcourse wich allows to run exe files on it. After that you just have to start and that's it, the lapper will start 'll u stop or it crash Smile

Thanks for the help Tongue never worked with a vpn though
MemoPedra
S2 licensed
Quote from Yisc[NL] :If you have a pc or server with LFS DCon running on, you can also put Lapper on it and let it run 24/7.
Nothing special has to be done for that.
Set it up, start it and leave it running.
That's how my server are done as well.

My server is rentend, i dont have a dcon
Lapper 24h online?
MemoPedra
S2 licensed
Is there a way to put the Lapper working 24h? i think its possible from a webserver i dont know lol but if yes please tell me how
Change host's name on rented server
MemoPedra
S2 licensed
Is there a way to change the name "Host" on a rented server?
I know in a dedicated server theres a line in the cfg with /player=Host and we can change it, but i've rented a server yesterday and im trying to change it... is there a command or anything else? i tried /player in the console but didnt worked.
MemoPedra
S2 licensed
Quote from JoaoCruzDR :Your video?

Quem fez o video foi o Miguel Pina, eu tava com o XRT e os sons fui eu q fiz
FGED GREDG RDFGDR GSFDG