Module pyinsim :: Class IS_NPL
[hide private]
[frames] | no frames]

Class IS_NPL

source code

New PLayer joining race (if PLID already exists, then leaving pits)

Instance Methods [hide private]
 
__init__(self, ReqI=0, PLID=0, UCID=0, PType=0, Flags=0, PName='', Plate='', CName='', SName='', Tyres=[0, 0, 0, 0], H_Mass=0, H_TRes=0, Model=0, Pass=0, Spare=0, SetF=0, NumP=0)
Initialise the packet.
source code
string
pack(self)
Pack the packet values into a binary formatted string.
source code
 
unpack(self, data)
Unpack the packet data from a binary formatted string.
source code
Method Details [hide private]

__init__(self, ReqI=0, PLID=0, UCID=0, PType=0, Flags=0, PName='', Plate='', CName='', SName='', Tyres=[0, 0, 0, 0], H_Mass=0, H_TRes=0, Model=0, Pass=0, Spare=0, SetF=0, NumP=0)
(Constructor)

source code 

Initialise the packet.

Parameters:
  • ReqI - 0 unless this is a reply to an TINY_NPL request
  • PLID - player's newly assigned unique id
  • UCID - connection's unique id
  • PType - bit 0 : female / bit 1 : AI / bit 2 : remote
  • Flags - player flags from PIF_
  • PName - nickname
  • Plate - number plate - NO ZERO AT END!
  • CName - car name
  • SName - skin name - MAX_CAR_TEX_NAME
  • Tyres - compounds
  • H_Mass - added mass (kg)
  • H_TRes - intake restriction
  • Model - driver model
  • Pass - passengers byte
  • SetF - Flags from SETF_
  • NumP - number in race (same when leaving pits, 1 more if new)

pack(self)

source code 

Pack the packet values into a binary formatted string.

Returns: string
A binary formatted string.

unpack(self, data)

source code 

Unpack the packet data from a binary formatted string.

Parameters:
  • data (string) - The packet data as a binary formatted string.