PDA

View Full Version : detecting took the wrong route


G. Dierckx
12th February 2008, 10:43
Hi, I was thinking, is there anyway to detect if someone took the wrong route or is the only thing i can use the message in the server %nickname% took the wrong route?

Greetz Glenn

G. Dierckx
12th February 2008, 20:26
nobody? :(

dougie-lampkin
12th February 2008, 22:28
IS_PLL, which is sent when someone spectates (which is what happens when you take the wrong route), doesn't contain any info about the spectate reason, and insim.txt doesn't have any info on it, so I presume there is no info sent for it...

Stuff
13th February 2008, 05:48
You can use IS_PEN. It has a reason enum, one of which is PENR_WRONG_WAY. Or you might be able to use the route checkers and other marshal objects. Maybe some other packet is sent when those are driven over, or the IS_PLL like dougie said. :)

G. Dierckx
13th February 2008, 11:36
You can use IS_PEN. It has a reason enum, one of which is PENR_WRONG_WAY. Or you might be able to use the route checkers and other marshal objects. Maybe some other packet is sent when those are driven over, or the IS_PLL like dougie said. :)

but PENR_WRONG_WAY will that be sent if u fly off track or drive int he wrong direction?

G. Dierckx
13th February 2008, 13:33
hmm IS_PEN didn't worked :s it wasn't send when i got out of bounds

dougie-lampkin
13th February 2008, 19:30
insim.txt says IS_PEN is for the AX route checker, which send a penalty when you hit it (and specs you)

G. Dierckx
14th February 2008, 09:32
insim.txt says IS_PEN is for the AX route checker, which send a penalty when you hit it (and specs you)
well, I used it and gave it say a massage each time the PEN was received, works find if u speed it pits but nothing when i got out of track -> to spectate

But i could use tho the MSO from "" + nickname + " took the wrong route"

mcgas001
14th February 2008, 13:45
string[] Message = MSO.Msg.Split(' ');
if (MSO.Msg.Contains("took the wrong route"))
{
for (int i = 0; i < Connections.Count; i++)
{
if (Connections[i].Playername.Contains(Message[1]))
{
// Do something
}
}
}


Thats a way of doing it :D
E: Save you a lot of time, there is not 1 single packet thats fired when you go wrong route.

dougie-lampkin
14th February 2008, 14:51
That would work, but if I typed "lol I took the wrong route!" then that would probably break it...

mcgas001
14th February 2008, 14:54
That would work, but if I typed "lol I took the wrong route!" then that would probably break it...

Wouldnt 'break' the code but a simple check before hand could stop that. eg. If(MSO.UCID == 0)

;)

dougie-lampkin
14th February 2008, 15:19
lol true :scratchch

G. Dierckx
14th February 2008, 16:28
jeah i figured out that thats the way of doing it, only it seems to be that the message from going out of bounds is differen from when u hit such a AX guy wich says wich direction you have to go. (just a detail) :thumb: