TASK
TASK_VEHICLE_HELI_PROTECT
0x1E09C32048FEFD1C
Jenkins: 0x0CB415EE
Signature
// TASK
void TASK_VEHICLE_HELI_PROTECT(Ped pilot, Vehicle vehicle, Entity entityToFollow, float targetSpeed, int drivingFlags, float radius, int altitude, int heliFlags)
Parameters
| Type | Name |
|---|---|
| Ped | pilot |
| Vehicle | vehicle |
| Entity | entityToFollow |
| float | targetSpeed |
| int | drivingFlags |
| float | radius |
| int | altitude |
| int | heliFlags |
Return type void
Build 323
Documentation
pilot, vehicle and altitude are rather self-explanatory. p4: is unused variable in the function. entityToFollow: you can provide a Vehicle entity or a Ped entity, the heli will protect them. 'targetSpeed': The pilot will dip the nose AS MUCH AS POSSIBLE so as to reach this value AS FAST AS POSSIBLE. As such, you'll want to modulate it as opposed to calling it via a hard-wired, constant #. 'radius' isn't just "stop within radius of X of target" like with ground vehicles. In this case, the pilot will fly an entire circle around 'radius' and continue to do so. NOT CONFIRMED: p7 appears to be a FlyingStyle enum. Still investigating it as of this writing, but playing around with values here appears to result in different -behavior- as opposed to offsetting coordinates, altitude, target speed, etc. NOTE: If the pilot finds enemies, it will engage them until it kills them, but will return to protect the ped/vehicle given shortly thereafter.
APPI RP
Join us on FiveM
Semi-Serious GTA V roleplay on APPI RolePlay — hop into Discord for rules and onboarding, then follow the guide when you're ready to connect.