141 {
142 int color =
ARGB(20, 0, 255, 0);
143
144 vector transform[4];
145
146 vector extents;
147
148 extents[0] = horizontalExtents;
149 extents[1] = playerHeight;
150 extents[2] = horizontalExtents;
151
153 if (speed > 8)
154 extents[2] = extents[2] * 6;
155 if (speed > 8)
156 extents[0] = 2;
157
158 if (!
IsAreaAtDoorFree( currentSeat, maxAllowedObjHeight, extents, transform ))
159 {
160 color =
ARGB(20, 255, 0, 0);
161 }
162
163 Shape shape =
Debug.DrawBox(-extents * 0.5, extents * 0.5, color);
164 shape.SetMatrix(transform);
165 return shape;
166 }
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)