I would like to ask if my understanding is correct. (I know there might be parts when you say duh, it’s literally there but bear with me)

In regards to the script, by default, it allows players to shoot out from the passenger seat.

When it goes to the other chunk of codes…

The first IF statement
I believe, from my understanding, that when there’s a person in a car, it checks if a person is in the main driver seat of the vehicle (basically the driver seat), it does not allow the civilian in the driver seat to shoot.

If I want to allow this, I’ll need to change SetPlayerCanDoDriveBy(PlayerId(), false) to SetPlayerCanDoDriveBy(PlayerId(), true).

The first ELSEIF statement
This basically re-iterates my first point that the passenger of the vehicle is able to shoot.

The first ELSE statement
If the requirement doesn’t meet either of the requirements for some reason, they’re not able to shoot.

In wordings, if the person in the driver seat is present and they’re holding a weapon called a marksman pistol, it allows them to shoot with that weapon. I don’t know GetPedWeapon() is an actual function but seeing the naming methods that has been put out, I’m just throwing something that sounds like how I think it would appear.