[Natives] Smugglers Run Counter Measures and Bombs

Here are some new natives added in the Smugglers Run DLC. Thought these would be useful for people who are trying to use the bombing and flares in the new aircraft. Do these even work in FiveM? I haven’t tried yet, but I will do tomorrow when I can.

int _GET_AIRCRAFT_COUNTERMEASURE_COUNT(Vehicle aircraft); // 0xF846AA63DF56B804
void _SET_AIRCRAFT_COUNTERMEASURE_COUNT(Vehicle aircraft, int countermeasureCount); // 0x9BDA23BF666F0855
int _GET_AIRCRAFT_BOMB_COUNT(Vehicle aircraft); // 0xEA12BD130D7569A1
void _SET_AIRCRAFT_BOMB_COUNT(Vehicle aircraft, int bombCount); // 0X3C249178351D41C8
void _SET_VEHICLE_BOMBS(Vehicle vehicle, int amount) // 0xF4B2ED59DEB5D774 b1180
void OPEN_BOMB_BAY_DOORS(Vehicle vehicle) // 0x87E7F24270732CB1 0x6574041D b323
void CLOSE_BOMB_BAY_DOORS(Vehicle vehicle) // 0x3556041742A0DC74 0xF8EC5751 b323
Any _GET_ARE_BOMB_BAY_DOORS_OPEN(Any p0) // 0XAAA6504EFF1463AB b1180
float _GET_PLANE_HOVER_MODE_PERCENTAGE(Vehicle plane); // 0xDA62027C8BDB326E

So you will need to hook bomb bay doors up to a keypress and you should be good from there.

3 Likes

After some script decompilation i have found the bombs are dropped using
_SHOOT_SINGLE_BULLET_BETWEEN_COORDS_WITH_EXTRA_PARMS
function: https://pastebin.com/raw/G8B7fk1A (found in freemode.ysc)

Example:
_SHOOT_SINGLE_BULLET_BETWEEN_COORDS_WITH_EXTRA_PARMS(vec1, vec2, 0, 0, weaponHash, PLAYER_PED_ID(), 1, 1, -1082130432, 0, 0, 0, 0, 1, 1, 0);

vec1 and vec2 are probably coords around the bomb bay area

weaponHash should be one of these:
1856325840 -1695500020 -1695500020 1794615063 1430300958 220773539

Hope this helps anyone

1 Like

I’d love to know if someone would be able to make a working script out of this. My scripting knowledge is close to zero, so I’d be eternally grateful if someone could get this to function properly!

Jaymo and I are working on it. As soon as we have something usable we will make it public.

Currently we have the ability to open the bombing bay doors, set the bomb type and set the ammo. Now working on the hard bit of calculating where the bombs drop.

1 Like

Has the script been finished?

It has proved more difficult then originally anticipated. We are still going at it between other projects. Will keep you updated.

Mk, thanks. Will this be a server resource or an ASI-like script?

Server resource. ASI scripts are clientside and server dependant. So essentially useless when a lot of servers have scripthook disabled.

Mk. Do you think it would be possible to create an asi script out of it anyways?

I’m not doing it. But sure it would be possible since it is using Natives.

Mk then. Welp, good luck with the resource. Lemme know when it’s done :stuck_out_tongue:

Any luck so far with using flares on the Thruster for example? I’ve been messing around with this:

but can’t seem to get that native to work at all…

Also can’t find anything about the flares anywhere else. :thinking:

Jaymo has been looking into the freemode scripts as Rockstar seemed to code this all manually and not make natives for it. This has kind of been pushed to the side to prioritise other scripts.

1 Like

i know this topic is ancient, but for future reference, these are actually the updated hashes:

the ones mentioned here in this topic are old hashes.

1 Like

Sorry to bump. However has anyone developed this further? The Natives are working to set & get the bomb and counter measures however no way to deploy them or drop bombs that I can find.

Any progress anywhere?