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