The online racing simulator
Searching in All forums
(187 results)
Silox
S2 licensed
Quote from T-RonX :This will do the job:
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_CLEAR, 0, UCID);

This is the code to close all buttons...
Silox
S2 licensed
Quote from T-RonX :This will do the job:
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_CLEAR, 0, UCID);

Thank you!
I think the most of my problems are solved now but you never know...
Silox
S2 licensed
Quote from the_angry_angel :Just set them to NULL or 0, would be my suggestion

That's what I tought too but:
Null is not longer used, use System.DBNull instead.
So I use System.DBNull but:
System.DBNull is a type in system and cannot be be used as an expression

Any ideas?

What I could do too is make the same loop as the loop that creates the buttons so it deletes the buttons button by button, but I think that that's too slow...

EDIT:
When I set the Req ID's to 0, InSim gave an Invalid Button ID error.
Last edited by Silox, .
Silox
S2 licensed
Quote from the_angry_angel :Nope - this is a limitation in InSim, not LFS_External. My only suggestion would be to select the player and then present the kick/ban/close buttons for that user only.

Thanks for your quick reaction I'll try to find a method for this the next days...

Quote from the_angry_angel :Yes - although I don't know the LFS_External API I can tell you that you need to send an IS_BFN, with sub type (SubT) of BFN_CLEAR, which will clear all buttons made by that insim instance.

Well, the problem here is when I try to clear the buttons like you've said with the LFS_External API with this code:
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_CLEAR)

It asks for a RequestId and a UniqueID, and there's no way around to only put the BFN_CLEAR as SubT...
Silox
S2 licensed
Sorry for asking but I have 2 questions / requests:

1. When making an admin panel with 9 buttons like Restart, end, close, ... and for each player it's name and 9 options like kick, ban 1 day, ban 7 days, ... and all the penalties, I ran out of RequestID's because my number of ID's is bigger than 255 which is the maximum size of a byte. Is it possible to change the Request ID and the Click ID to a short?
2. Is it possible to clear all the buttons on the screen with one command?

Thanks in regards,
Silox.
Silox
S2 licensed
Yup, that works

Thanks!
Silox
S2 licensed
Hey T-RonX,

I'm coding like 2 days now in VB with your LFS External and I get it bit by bit...
My knowledge of VB is good, but not excellent ^^ Forgive me for the crappy code =$

I'm trying to make a visual admin panel but I have this error:
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

In this piece of code:
Me.Invoke(New dlgMSO(AddressOf MSO_MessageOut), p)

The total code is listed here:
Private Sub MSO_MessageOut(ByVal MSO As Packets.IS_MSO)
'Invoke method due to threading. Add this line to any receive event before updating the GUI. Just like in this example, you only have to add a new delegate with the right packet parameter and adjust this line in the new method.
If DoInvoke() Then
Dim p As Object = MSO
Me.Invoke(New dlgMSO(AddressOf MSO_MessageOut), p)
Return
End If

'tekst.Replace(Connections(GetConnIdx(MSO.UCID)).PlayerName, "").Replace("^0", "").Replace("^1", "").Replace("^2", "").Replace("^3", "").Replace("^4", "").Replace("^5", "").Replace("^6", "").Replace("^7", "").Replace("^8", "")

Dim tekst As String = MSO.Msg.Substring(MSO.TextStart, (MSO.Msg.Length - MSO.TextStart))
Dim msg() As String = tekst.Split()
Select Case msg(0)
Case "!online"
InSim.Send_BTN_CreateButton("Players: " & CStr(Players.Count), Flags.ButtonStyles.ISB_CLICK Or Flags.ButtonStyles.ISB_DARK, 5, 30, 10, 20, 99, MSO.UCID, 99, True)

Case "!connections"
InSim.Send_BTN_CreateButton("Connecties: " & CStr(Connections.Count), Flags.ButtonStyles.ISB_CLICK Or Flags.ButtonStyles.ISB_DARK, 5, 30, 15, 20, 98, MSO.UCID, 98, True)

Case "!userlist"

Dim i As Integer = 1
Dim k As Integer = 0

'InSim.Send_BTN_CreateButton("Exit", Flags.ButtonStyles.ISB_CLICK Or Flags.ButtonStyles.ISB_DARK, 10, 20, 30, 10, 97, MSO.UCID, 97, True)

For i = 1 To Connections.Count
k = 0
InSim.Send_BTN_CreateButton(Connections(i).PlayerName, Flags.ButtonStyles.ISB_CLICK Or Flags.ButtonStyles.ISB_DARK, 5, 20, i * 5 + 20 + 5, 20, i, MSO.UCID, i, True)
k = CInt(CStr(i) + "1")
InSim.Send_BTN_CreateButton("Kick", Flags.ButtonStyles.ISB_CLICK Or Flags.ButtonStyles.ISB_DARK, 5, 20, i * 5 + 25, 40, k, MSO.UCID, k, True)
k = CInt(CStr(i) + "2")
InSim.Send_BTN_CreateButton("Ban 1 day", Flags.ButtonStyles.ISB_CLICK Or Flags.ButtonStyles.ISB_DARK, 5, 20, i * 5 + 25, 60, k, MSO.UCID, k, True)
k = CInt(CStr(i) + "3")
InSim.Send_BTN_CreateButton("Ban 7 days", Flags.ButtonStyles.ISB_CLICK Or Flags.ButtonStyles.ISB_DARK, 5, 20, i * 5 + 25, 80, k, MSO.UCID, k, True)
k = CInt(CStr(i) + "4")
InSim.Send_BTN_CreateButton("Ban forever", Flags.ButtonStyles.ISB_CLICK Or Flags.ButtonStyles.ISB_DARK, 5, 20, i * 5 + 25, 100, k, MSO.UCID, k, True)
Next i


End Select

TextBox1.Text += tekst & Constants.vbCrLf
End Sub

When I put my For i = connection.count... loop in comment, I don't get an error...

UPDATE:

Tested a bit further and I get the error when I try this: Connections(i).PlayerName
This command in the loop should get all the PlayerNames of al the people who are connected with the server... Do I do this wrong or is there another way?
Last edited by Silox, .
Silox
S2 licensed
Quote from Yisc[NL] :When I make a button to broadcast a RCM, the RCM isn't cleared:

/rcc_all is the function to stop showing the RCM message
Silox
S2 licensed
Quote from w00h00 :Hello guys,

Yesterday we moved a gameserver with the Lapper on it (nothing to worry about, I thought). The problem it that the server starts counting from 0. He does'nt see any laps (with the !laps command). Also with a "clean" installation of the Lapper with the existing PB.txt and DriftPB.txt it holds the same problem. Is there a possibility that the text files are corrupt, or do I need to look somewhere else for this problem. Thanks!

- Jasper

Hey Jasper,

I tried this too, and this is the problem:
When you use a PB.txt from another server and restart the lapper, the lapper ignores all the PB's registered in the PB.txt.
Silox
S2 licensed
Quote from jasonmatthews :I would suggest posting your lapper.cfg file, but blank out the passwords. Then maybe someone can look at it and see the problem.

The config has'nt beed modified, I only changed the PW and IP...
Silox
S2 licensed
Exactly, the results are dysplayed in !top command, but friendly position keeps staying at 0/0, no matter what defaultcar you select...
Silox
S2 licensed
Hello,

I tried to run the lapper and run a server. In previous versions it worked, but not now anymore.

The problem I'm experiencing is that the Friendly positions don't work anymore. If you got a new PB, it says Friendly Position: 0/0. But the times get registered in the top list.

I tried to put multiple defaultcars, none, and all defaultcars but nothing worked...

Silox.
Last edited by Silox, .
FGED GREDG RDFGDR GSFDG