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