Yimura / GTAV-Classes

MIT License
199 stars 67 forks source link

Added vehicle model flags to CVehicleModelInfo #148

Closed horizon-84 closed 9 months ago

horizon-84 commented 9 months ago

Allows you to read/write vehicle model flags

Descriptions to the flags: https://gtamods.com/wiki/Vehicles.meta (scroll down a bit)

gir489returns commented 9 months ago

Would this be able to make it so you can fire your weapons in a plane?

horizon-84 commented 9 months ago

Would this be able to make it so you can fire your weapons in a plane?

You mean like drive-by in a plane?

gir489returns commented 9 months ago

Would this be able to make it so you can fire your weapons in a plane?

You mean like drive-by in a plane?

Yeah.

horizon-84 commented 9 months ago

Would this be able to make it so you can fire your weapons in a plane?

You mean like drive-by in a plane?

Yeah.

Haven't tested but I highly doubt it, from my experience there was more than 1 check.

I messed around with this a year or so ago, let me see if I can find the sig, nop to return 0 = you can scroll through all the weapons in any vehicle by pressing tab. But I also recall that you need another nop to let the player actually equip the selected weapon. There is a check if the right weapon hash from the vehicle weapon hash data is equipped.

Now that I think of it, maybe if you edited that vehicle weapon hash data (similar to how I edit the vehicle flags here) you can add other weapon hashes to it to maybe be able to equip anything so you wouldnt need the second nop. It's most likely in CVehicleModelInfo somewhere.

horizon-84 commented 9 months ago

af

This is what I was referring to.

gir489returns commented 9 months ago

Reference in n

Interesting. I know certain vehicles like the Toreador include their own weapons but still allow our driveby override by replacing the one_handed_groups with basically everything. However, there seems to be a random assortment of vehicles that just don't allow or respect it, and I'm not sure how to fix it.

gir489returns commented 9 months ago

OK I remember now. I looked at my notes, and I can force the player to select a weapon in the plane, however because the mouse can also fly the plane, it becomes extremely nauseating and borderline unplayable to do a drive by in a plane so I removed that functionality.

horizon-84 commented 9 months ago

OK I remember now. I looked at my notes, and I can force the player to select a weapon in the plane, however because the mouse can also fly the plane, it becomes extremely nauseating and borderline unplayable to do a drive by in a plane so I removed that functionality.

Well, the cursor driving should be very easy to disable though. You sure there isn't even a native for that?