The online racing simulator
#26 - vane
thanks, its so confusing!!! best to learn the hard way, lapper makes it look so easy
whats a ucid? is there anything else i need to add to put that button code in with? thanks

i cant get the swear function to work i say vane but it doesn't say anything

thinking into the future is there any way i can connect this to download a pb.txt from an ftp site?
Quote from vane :thanks, its so confusing!!! best to learn the hard way, lapper makes it look so easy

What you see is the easy bit, all that you see is a config, go look at the source code you wont be saying that again.

Quote from vane :whats a ucid?

A UCID is a unique identifier, its kinda like going down a club, signing up and getting a member ship number.
#28 - vane
how do i find out the ucid to put in the button code?
Quote from vane :how do i find out the ucid to put in the button code?

Most packets you receive contain a UCID. Something like MSO.UCID should work. If it's a PLID you get with the packet you have to use the connections list. If you want to send the button on any other moment, you have to use the connections list too.
#30 - vane
huh? so what do i type in instead of UCID

"ags.ButtonStyles.ISB_CLICK, 5, 30, 100, 10, 96, 1, UCID, 40, false);"
Quote from vane :huh? so what do i type in instead of UCID

"ags.ButtonStyles.ISB_CLICK, 5, 30, 100, 10, 96, 1, UCID, 40, false);"

OK, you need to get the UCID from the packet(s) that come in, say you want to send that button when some 1 joins you look for the private void NCN, then inside of that event you add the button code you want but replace UCID with NCN.UCID and then it the insim program will send that button to a new connection!
#32 - vane
ah now i understand you, i looked earlier and thought oh god what the hell is he chatting about, thanks

p.s i assume if you only want one person to see the button, you add their ucid instead of ncn.ucid
No, the majority of packets are for each person in the server for example NCN stands for New Connection. Now theres always a packet fired on NCN with the new players details. So when someone connects to the server you have all the info you need. NCN.UCID is for only 1 connection but i have a plan that will help you understand, Try sending this inside of private void NCN.


InSim.Send_MST_Message("New User " + NCN.UName);


Then go and join the server and you will see what i mean about NCN being a packet for each person
#34 - vane
now the button works, but when i click it, it brings up a text box, how do i set what i want the button to do? which of the numbers changes the buttons location?
Quote from vane :now the button works, but when i click it, it brings up a text box, how do i set what i want the button to do? which of the numbers changes the buttons location?

i get the feeling you have been looking at that pic in the other post by T-RonX *sigh*, basically button methods are overloaded so they can be a text box or just a average button. Delete the button text and try again. (If your using Visual C# IDE click the box that shows up and it will show you the different ways you can do that method)
#36 - vane
i dont not understand what you are saying :S what do i have to delete then what do i have to do after?

what do you do if the packet you want to detect for has ISP_ at the beginning (i want to know when someone votes to end race/votes to restart)

this is what i have so far

private void VTN(Packets.IS_VTN VTN)
{
InSim.Send_Small_VTA;
InSim.Send_MST_MESSAGE("/msg " + VTN.UCID + ", Do not try and vote");
}
#37 - vane
are you eventually going to make this work for outsim?
Quote from vane :are you eventually going to make this work for outsim?

Yes
#39 - vane
good because id like to be able to use outsim and be able to have it open using a window, also could you release the source of your lfs mail so i could build it into my insim? cause i cant run two insims at the same time
Quote from vane :i dont not understand what you are saying :S what do i have to delete then what do i have to do after?

what do you do if the packet you want to detect for has ISP_ at the beginning (i want to know when someone votes to end race/votes to restart)

this is what i have so far

private void VTN(Packets.IS_VTN VTN)
{
InSim.Send_Small_VTA;
InSim.Send_MST_MESSAGE("/msg " + VTN.UCID + ", Do not try and vote");
}

OK, first your sending a small? why?, if you wanna cancel a vote you send a

InSim.Send_TINY(Enums.Tiny.TINY_VTC, 0);
InSim.Send_MST_Message("/msg " + Connections[GetConnIdx(VTN.UCID)].PlayerName + " ^7do not try and vote");



You need to read inside of insim.txt and it will explain what packets carry and what they are used for...
#41 - vane
what packet is used to cancel the vote? i was thinking of having, if they vote to restart they get told not to but if they vote to end they get kicked
Quote from vane :what packet is used to cancel the vote? i was thinking of having, if they vote to restart they get told not to but if they vote to end they get kicked

Do you not listen?????? i said clearly up there send a tiny VTC(Vote To Cancel)
#43 - vane
ah i miss interpreted you i thought that paacket you said was reading that someone had voted not to cancel it ill try it out thanks your keeping your temper with me
it won't do anything, do i need to do an "if"?
#44 - vane
i finally got that thing to compile but it doesnt say what location im at, is there any way i can make this location show up on a button(not a clickable one)
I suggest you take some C# lessons before trying to achieve all kinds of stuff.
#46 - vane
i think i understand the basic layout, unfortunately there isn't anywhere for me to actually take coding lessons but ill find some online coding lessons.
#47 - vane
what kind of code would i need to add to get a button that doesn't bring up a text window? thanks
#49 - vane
is there anyway i can get the insim to list all the connections to the host when i click a button(similar to the connections list) and a kick and ban button next to each name? thanks
Quote from vane :is there anyway i can get the insim to list all the connections to the host when i click a button(similar to the connections list) and a kick and ban button next to each name? thanks

Doesn't it do that by default? Why make one when it's there...

But to the question, yes it is. Each player has a PLID, which AFAIK are numbered 1-32 (or how ever many connections you have). Usernames and Playernames can be gotten from the PLID's in the button class I think, so then it's just a matter of making em! I personaly haven't used the button class yet, so this is all I can help you with I'm afraid...

EDIT: While I'm here, I have a question - does resolution affect insim button placement? I run at 1024 X 768 windowed, but if I make buttons to suit my resolution, what happens if someone with higher/lower resolution comes along? Are buttons made bigger, or do they look out of place?

.NET - LFS External (InSim/OutSim/OutGauge SDK Library)
(538 posts, started )
FGED GREDG RDFGDR GSFDG