IS PEN

From LFS Manual
Revision as of 12:10, 10 February 2026 by Bokujishin (talk | contribs) (Created page with "== Introduction == The '''PEN'''alty packet is sent by LFS when a player receives a penalty, or their penalty is cleared. {| class="wikitable" |+ IS_PEN packet properties |-...")
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to navigationJump to search

Introduction

The PENalty packet is sent by LFS when a player receives a penalty, or their penalty is cleared.

IS_PEN packet properties
Type Name Description
byte Size 8
byte Type ISP_PEN
byte ReqI 0
byte PLID player's unique id
byte OldPen old penalty value (PENALTY_x)
byte NewPen new penalty value
byte Reason penalty reason (PENR_x)
byte Sp3

Packet Details

Size

The size of the packet is always 8 bytes.

Type

The packet type from the ISP_ enumeration, always ISP_PEN.

ReqI

ReqI is always equal to zero.

PLID

The player's unique ID.

LapsDone

The number of completed laps.

Flags

Player flags (see IS_NPL#Flags).

FuelAdd

If /showfuel yes, show the fuel added in percent; otherwise 255.

OldPen

The penalty value before receiving this packet, from the PENALTY_ enumeration.

NewPen

The penalty value after receiving this packet, from the PENALTY_ enumeration.

Reason

The reason for the penalty change, from the PENR_ enumeration:

  • PENR_UNKNOWN: Unknown or cleared penalty
  • PENR_ADMIN: Penalty given by an admin
  • PENR_WRONG_WAY: Wrong way driving
  • PENR_FALSE_START: Starting before green light
  • PENR_SPEEDING: Speeding in the pit lane
  • PENR_STOP_SHORT: Stop-go pit stop too short
  • PENR_STOP_LATE: Compulsory stop is too late

Notes

The Reason is only accurate if the penalty is given by LFS, as there is no way to assign a penalty other than using one of the /p_dt, /p_sg, /p_30, /p_45 commands, which all result in PENR_ADMIN.