-
-
Notifications
You must be signed in to change notification settings - Fork 486
Add is/setVehicleWindowOpen #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -5576,12 +5576,37 @@ void CClientPed::SetDoingGangDriveby ( bool bDriveby ) | |||
} | |||
else if ( bDriveby ) | |||
{ | |||
bool bRight = ( GetOccupiedVehicleSeat ( ) % 2 == 0 ) ? false : true; | |||
char cSeat = GetOccupiedVehicleSeat ( ); | |||
bool bRight = ( cSeat % 2 == 0 ) ? false : true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cSeat % 2 == 0 is already a boolean expression.
cSeat % 2 != 0 has the same effect without the ternary operator
Hm... I can do it but in that case function will return always true, even vehicle don't have specified window. //edit |
I think that is acceptable. |
Return always true (between 0 - 6 IDs) if vehicle is unstreamed, but return true value if is streamed.
Ok, done. |
Nice work! 👍 |
So, this basically adds clientside function to control vehicle windows. Also I seen when ped start driveby as driver the window don't open, this fixes that. I redefined windows ID to be 0 - 6 but I'm not sure I do it proper place (game_sa).