122 {
123 int color =
ARGB(20, 0, 255, 0);
124
125 vector transform[4];
126
127 vector extents;
128
129 extents[0] = horizontalExtents;
130 extents[1] = playerHeight;
131 extents[2] = horizontalExtents;
132
134 if (speed > 8)
135 extents[2] = extents[2] * 6;
136 if (speed > 8)
137 extents[0] = 2;
138
139 if (!
IsAreaAtDoorFree( currentSeat, maxAllowedObjHeight, extents, transform ))
140 {
141 color =
ARGB(20, 255, 0, 0);
142 }
143
144 Shape shape =
Debug.DrawBox(-extents * 0.5, extents * 0.5, color);
145 shape.SetMatrix(transform);
146 return shape;
147 }
float GetSpeedometerAbsolute()
Returns the current speed of the vehicle in km/h. Value is absolute.
override bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
int ARGB(int a, int r, int g, int b)