The online racing simulator
Searching in All forums
(5 results)
martzz
S3 licensed
Do I have to update python too to get the new version working?

Now my python is saying that:
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
martzz
S3 licensed
Thanks for very very good script.
Python username output
martzz
S3 licensed
import pyinsim

def multi_car_info(insim, cpp):
for info in cpp.Info:
print '%d' % (info.ViewPLID)

insim = pyinsim.insim('127.0.0.1', 29999, Flags=pyinsim.ISP_CPP, Interval=400, Admin='password')

insim.bind(pyinsim.ISP_CPP, multi_car_info)

pyinsim.run()

I am trying to get the username that is visible in game, but it doesn't print anything. :S
Last edited by martzz, .
martzz
S3 licensed

Big thanks to you!
Help about the coordinates stuff python
martzz
S3 licensed
I managed to get the hello insim program working. How could I now do almost the same program but that shows me coordinates that my car is. I should use MCI packet, but I don't know exactly how. :/ Could anyone help me.

I tried to change the MSTs to MCI but that didn't work. :S
Here is the original Hello insim program:

import pyinsim

# Initialize InSim.
insim = pyinsim.insim('127.0.0.1', 29999, Admin='password')

# Send message packet to LFS.
insim.send(pyinsim.ISP_MST, Msg='Hello, InSim!')

# Run pyinsim.
pyinsim.run()

FGED GREDG RDFGDR GSFDG