The online racing simulator
Help with InSim application!
(9 posts, started )
Help with InSim application!
Well how can I do these things:

A shopping centre where only in that box you can use a command to buy stuff.

A command which is sorta like a command where you can buy a used car (random lower prices)

A reporting system in-game e.g !report username reason.

A command which counts down till it tows you back to the pits.

A lottery ticket which can only in the shopping centre box you buy stuff.

An officer system which has a timer which detects the nearest car and has a timer

A Distance counter for KM and Miles

Please help
Quote from shaun463 :A shopping centre where only in that box you can use a command to buy stuff.

That's just reading data from a data source, i.e. a database or a text file where you read whats currently available in the shopping centre. If someone buys something remove one from the quantity available of that item, and record in another data source that your user owns that.

Quote from shaun463 :A command which is sorta like a command where you can buy a used car (random lower prices)

Same as the shopping centre. I cant see why you'd want to use a "used car" though, unless their behaviour would be different.

Quote from shaun463 :A reporting system in-game e.g !report username reason.

If you wanted to do it that way, you need to listen to the MSO or III packets and check to see if it starts with !report, and then split up the rest of the string and store it in some way.

Quote from shaun463 :A command which counts down till it tows you back to the pits.

A timer, update the button every few seconds, and then when the timer expires pit that person using /pit username.

Quote from shaun463 :A lottery ticket which can only in the shopping centre box you buy stuff.

Doesnt make much sense to me, as I've never been on a cruise server. Explain.

Quote from shaun463 :An officer system which has a timer which detects the nearest car and has a timer

The nearest office bit requires the application to know who is an officer, record their last known location (MCI x and y coords) and then you just use pythagorus to get your straight line to distance between them and you on every MCI update. You then send an update to a button indicating this distance. No idea what you mean by "a timer" though. What's the purpose?

Quote from shaun463 :A Distance counter for KM and Miles

DarkTimes has a comprehensive post here;
http://www.lfsforum.net/showthread.php?p=765698#post765698
After a certain amount of time the chase will move on Thanks for the reply altough I do not understand some of what you mean't.
#4 - sun
Hi Shaun...

the_angry_angel - what he means with lottery ticket, like me, when i want to go inside a box and get the ticket. So Shaun, my example is that if someone goes on this box, you need to use some co-ordiantes. For example

if ((MCI.Info[0].X > 1663734) && (MCI.Info[0].Y > -6273953))
{

InSim.Send_MST_MessageToConnection("/msg ^7you have got the ticket" bla bla bla

}

Thats not the full code, but that wont do a box, that will only do a certain point on the track. If you want to do somthing like that, use 'Pytharagus Theorm'.

E.g... a2+b2=c2. That is just basically 3 points of a triangle.

a2



b2 c2


I hope this helps! If any one has spotted somthing wrong in my post, I appoligize.

Thanks

Owen.
No, Pythagoras theorem is the sum of the squares of the two shorter sides equal the square of the longest side.
MST_MessageToConnection wtf? lol
#8 - sun
lol, sorry. my cricital error
Quote from sun :I hope this helps! If any one has spotted somthing wrong in my post, I appoligize.

if anyone manages to find something correct ill buy him a beer at the lfs meet

Help with InSim application!
(9 posts, started )
FGED GREDG RDFGDR GSFDG