Skip to main content

Violation


Namespace: FivePD.API.Utils#
File: Source/Utils/Violation.cs#

The result of the GetPedData(<ped>) method.


Fields#

Offence#

Type:string

The name of the offence.

Charge#

Type:string

The name of the charge.

Usage#

Violation violation = new Violation();violation.Offence = "<offence>";violation.Charge = "<charge>";

Using the value that ped.GetData() (extension) method returns:

Ped ped;...var violations = await ped.GetData().Violations; // returns a List of Violations