Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions HUD/SetGpsFlags.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,26 @@ ns: HUD

```c
// 0x5B440763A4C8D15B 0x60539BAB
void SET_GPS_FLAGS(int p0, float p1);
void SET_GPS_FLAGS(int flags, float blippedRouteDisplayDistance);
```

```
Only the script that originally called SET_GPS_FLAGS can set them again. Another script cannot set the flags, until the first script that called it has called CLEAR_GPS_FLAGS.
Doesn't seem like the flags are actually read by the game at all.
Sets flags to control GPS behaviour, for routes which use the scripted GPS slot. This includes blip-routes, racetrack, and multi-gps routes. Values will be returned to `GPS_FLAG_NONE` upon mission exit.

```c
enum eGPSFlags {
GPS_FLAG_NONE = 0,
GPS_FLAG_IGNORE_ONE_WAY = 1,
GPS_FLAG_FOLLOW_RULES = 2,
GPS_FLAG_AVOID_HIGHWAY = 4,
GPS_FLAG_NO_ROUTE_SHIFT = 8,
GPS_FLAG_CUSTOM_PROXIMITY = 16,
GPS_FLAG_NO_PULL_PATH_TO_RIGHT_LANE = 32,
GPS_FLAG_AVOID_OFF_ROAD = 64,
GPS_FLAG_IGNORE_DESTINATION_Z = 128
}
```

## Parameters
* **p0**:
* **p1**:
* **flags**: See `eGPSFlags`
* **blippedRouteDisplayDistance**: the distance which a blipped entity must be away from the player before a GPS route to them is displayed; use this to avoid displaying a GPS for entities which are close enough to the player (default `0`)

27 changes: 18 additions & 9 deletions TASK/TaskCombatPed.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,27 @@ ns: TASK

```c
// 0xF166E48407BAC484 0xCB0D8932
void TASK_COMBAT_PED(Ped ped, Ped targetPed, int p2, int p3);
void TASK_COMBAT_PED(Ped ped, Ped targetPed, int combatFlags, int responseFlags);
```

```
Makes the specified ped attack the target ped.
p2 should be 0
p3 should be 16
Makes the specified ped attack the target ped.

```c
enum eTaskCombatPedFlags {
COMBAT_PED_NONE = 0,
COMBAT_PED_PREVENT_CHANGING_TARGET = 67108864,
COMBAT_PED_DISABLE_AIM_INTRO = 134217728
}

enum eTaskThreatResponseFlags {
TASK_THREAT_RESPONSE_NONE = 0,
TASK_THREAT_RESPONSE_CAN_FIGHT_ARMED_PEDS_WHEN_NOT_ARMED = 16
}
```

## Parameters
* **ped**:
* **targetPed**:
* **p2**:
* **p3**:
* **ped**: `Ped` to assign the task to.
* **targetPed**: Target `Ped` of the task.
* **combatFlags**: See `eTaskCombatPedFlags` (default `0`)
* **responseFlags**: See `eTaskThreatResponseFlags` (default `16`)

55 changes: 43 additions & 12 deletions TASK/TaskEnterVehicle.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,52 @@ ns: TASK

```c
// 0xC20E50AA46D09CA8 0xB8689B4E
void TASK_ENTER_VEHICLE(Ped ped, Vehicle vehicle, int timeout, int seatIndex, float speed, int flag, Any p6);
void TASK_ENTER_VEHICLE(Ped ped, Vehicle vehicle, int time, int seatIndex, float moveBlendRatio, int flags, char* overridenClipSet);
```

```
speed 1.0 = walk, 2.0 = run
p5 1 = normal, 3 = teleport to vehicle, 8 = normal/carjack ped from seat, 16 = teleport directly into vehicle
p6 is always 0
```c
enum eEnterExitVehicleFlags {
// If the task is interupted (bumped, shot), dont resume.
ECF_RESUME_IF_INTERRUPTED = 1,
// Warps ped to entry point ready to open the door/enter seat
ECF_WARP_ENTRY_POINT = 2,
// Jack the ped occupying the vehicle, regardless of relationship status
ECF_JACK_ANYONE = 8,
// Warp the ped onto the vehicle
ECF_WARP_PED = 16,
// Dont wait for the vehicle to stop before exiting
ECF_DONT_WAIT_FOR_VEHICLE_TO_STOP = 64,
// Dont close the vehicle door
ECF_DONT_CLOSE_DOOR = 256,
// Allow ped to warp to the seat if entry is blocked
ECF_WARP_IF_DOOR_IS_BLOCKED = 512,
// Jump out of the vehicle
ECF_JUMP_OUT = 4096,
// TASK_LEAVE_ANY_VEHICLE auto defaults the ECF_WARP_IF_DOOR_IS_BLOCKED, set this flag to not set that
ECF_DONT_DEFAULT_WARP_IF_DOOR_BLOCKED = 65536,
// Use entry/exit point on the left hand side
ECF_USE_LEFT_ENTRY = 131072,
// Use entry/exit point on the right hand side
ECF_USE_RIGHT_ENTRY = 262144,
// When jacking just pull the ped out, but don't get in
ECF_JUST_PULL_PED_OUT = 524288,
// Disable shuffling - forces ped to use direct door only
ECF_BLOCK_SEAT_SHUFFLING = 1048576,
// Allow ped to warp if the shuffle link to that seat is blocked by someone
ECF_WARP_IF_SHUFFLE_LINK_IS_BLOCKED = 4194304,
// Never jack anyone when entering/exiting
ECF_DONT_JACK_ANYONE = 8388608,
// Wait for our entry point to be clear of peds before exiting
ECF_WAIT_FOR_ENTRY_POINT_TO_BE_CLEAR = 16777216
}
```

## Parameters
* **ped**:
* **vehicle**:
* **timeout**:
* **seatIndex**: See eSeatPosition declared in [`IS_VEHICLE_SEAT_FREE`](#_0x22AC59A870E6A669).
* **speed**:
* **flag**:
* **p6**:
* **ped**: `Ped` to assign the task to.
* **vehicle**: The target `Vehicle`
* **time**: If Time = -1 the ped will never warp into the vehicle. (default `20000`)
* **seatIndex**: See `eSeatPosition` declared in [`IS_VEHICLE_SEAT_FREE`](#_0x22AC59A870E6A669). (default `-1`)
* **moveBlendRatio**: 0.0 = still, 1.0 = walk, 2.0 = run, 3.0 = sprint (default `2.0`)
* **flags**: See `eEnterExitVehicleFlags` (default `1`)
* **overridenClipSet**: clipset that will be used to override the vehicle enter animations

48 changes: 32 additions & 16 deletions TASK/TaskGoToCoordAnyMeansExtraParams.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,40 @@ ns: TASK

```c
// 0x1DD45F9ECFDB1BC9 0x094B75EF
void TASK_GO_TO_COORD_ANY_MEANS_EXTRA_PARAMS(Ped ped, float x, float y, float z, float speed, Any p5, BOOL p6, int walkingStyle, float p8, Any p9, Any p10, Any p11);
void TASK_GO_TO_COORD_ANY_MEANS_EXTRA_PARAMS(Ped ped, float x, float y, float z, float moveBlendRatio, Vehicle vehicle, BOOL useLongRangeVehiclePathing, int drivingFlags, float maxRangeToShootTargets, float extraVehToTargetDistToPreferVeh, float driveStraightLineDistance, int taskFlags, float warpTimerMS);
```

```
NativeDB Added Parameter 13: Any p12
```c
enum eTaskGoToCoordAnyMeansFlags{
TGCAM_DEFAULT = 0,
// Ignore the health of the vehicle (default behaviour is to not use any vehicle with less than 600 health)
TGCAM_IGNORE_VEHICLE_HEALTH = 1,
// Considers all nearby vehicles for suitability (default behaviour is to consider only the vehicle closest to the ped)
TGCAM_CONSIDER_ALL_NEARBY_VEHICLES = 2,
// Performs the same tests as is done in IS_VEHICLE_DRIVEABLE (default behaviour is to just check the vehicle's health)
TGCAM_PROPER_IS_DRIVEABLE_CHECK = 4,
// Instructs the ped to remain in the vehicle at the end, so that multiple tasks can be chained together
TGCAM_REMAIN_IN_VEHICLE_AT_DESTINATION = 8,
// Ped will never abandon the vehicle it is in
TGCAM_NEVER_ABANDON_VEHICLE = 16,
// Ped will never abandon the vehicle it is in if vehicle is moving
TGCAM_NEVER_ABANDON_VEHICLE_IF_MOVING = 32,
// Peds will use the targeting system for threats and register any threats they can attack (rather than just using the closest targetable ped)
TGCAM_USE_AI_TARGETING_FOR_THREATS = 64
}
```

## Parameters
* **ped**:
* **x**:
* **y**:
* **z**:
* **speed**:
* **p5**:
* **p6**:
* **walkingStyle**:
* **p8**:
* **p9**:
* **p10**:
* **p11**:

* **ped**: The `Ped` Handle.
* **x**: The goto target x coordinate.
* **y**: The goto target y coordinate.
* **z**: The goto target z coordinate.
* **moveBlendRatio**: 0.0 = still, 1.0 = walk, 2.0 = run, 3.0 = sprint.
* **vehicle**: If defined, the pedestrian will only move if said vehicle exists. If you don't want any sort of association, just set it to `0`.
* **useLongRangeVehiclePathing**: Setting to `true` tells the vehicle to use longrange vehicle pathing. (default `false`)
* **drivingFlags**: See `eDrivingFlags` enum in [`TASK_GO_TO_COORD_ANY_MEANS`](#_0xF91DF93B). (default `786603`)
* **maxRangeToShootTargets**: Determines the maximum distance at which the `Ped` will engage in combat with threatening targets. (default `-1.0`)
* **extraVehToTargetDistToPreferVeh**: (default `0.0`)
* **driveStraightLineDistance**: allow script to define the distance at which vehicles switch to straight-line pathfinding; (default `20`)
* **taskFlags**: See `eTaskGoToCoordAnyMeansFlags` enum. (default `0`)
* **warpTimerMS**: Warps ped to target position if ped gets stuck for this amount of time (in milliseconds) (only if fWarpTimeMS != -1.0). Only works for peds on foot or in a car/bike (not aircraft/boats). Ped will be removed from vehicle on warp. (default `-1.0`)
45 changes: 37 additions & 8 deletions TASK/TaskPlayAnimAdvanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,42 @@ ns: TASK

```c
// 0x83CDB10EA29B370B 0x3DDEB0E6
void TASK_PLAY_ANIM_ADVANCED(Ped ped, char* animDictionary, char* animationName, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float blendInSpeed, float blendOutSpeed, int duration, Any flag, float animTime, Any p14, Any p15);
void TASK_PLAY_ANIM_ADVANCED(Ped ped, char* animDictionary, char* animationName, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float blendInSpeed, float blendOutSpeed, int duration, int flag, float animTime, int rotationOrder, int ikFlags);
```

Similar in functionality to [`TASK_PLAY_ANIM`](#_0xEA47FE3719165B94), except the position and rotation parameters let you specify the initial position and rotation of the task. The ped is teleported to the position specified.

[Animations list](https://alexguirre.github.io/animations-list/)

```c
enum eEulerRotationOrder {
EULER_XYZ = 0,
EULER_XZY = 1,
EULER_YXZ = 2,
EULER_YZX = 3,
EULER_ZXY = 4,
EULER_ZYX = 5
}

enum eIKFlags {
AIK_NONE = 0, // No Ik control during the task
AIK_DISABLE_LEG_IK = 1, // Disable leg ik during the task
AIK_DISABLE_ARM_IK = 2, // Disable arm ik during the task
AIK_DISABLE_HEAD_IK = 4, // Disable head ik during the task
AIK_DISABLE_TORSO_IK = 8, // Disable torso ik during the task
AIK_DISABLE_TORSO_REACT_IK = 16, // Disable torso react ik during the task
AIK_USE_LEG_ALLOW_TAGS = 32, // Use anim leg allow tags to determine when leg ik is enabled
AIK_USE_LEG_BLOCK_TAGS = 64, // Use anim leg block tags to determine when leg ik is disabled
AIK_USE_ARM_ALLOW_TAGS = 128, // Use anim arm allow tags to determine when ik is enabled
AIK_USE_ARM_BLOCK_TAGS = 256, // Use anim arm block tags to determine when ik is disabled
AIK_PROCESS_WEAPON_HAND_GRIP = 512, // Process the left hand weapon grip ik during the task
AIK_USE_FP_ARM_LEFT = 1024, // Use first person ik setup for left arm (cannot be used with AIK_DISABLE_ARM_IK)
AIK_USE_FP_ARM_RIGHT = 2048, // Use first person ik setup for right arm (cannot be used with AIK_DISABLE_ARM_IK)
AIK_DISABLE_TORSO_VEHICLE_IK = 4096, // Disable torso vehicle ik during the task
AIK_LINKED_FACIAL = 8192 // Searches the dictionary of the clip being played for another clip with the _facial suffix to be played as a facial animation.
}
```

## Parameters
* **ped**: The ped you want to play the animation
* **animDictionary**: The animation dictionary
Expand All @@ -22,11 +51,11 @@ Similar in functionality to [`TASK_PLAY_ANIM`](#_0xEA47FE3719165B94), except the
* **rotX**: Initial X rotation of the task
* **rotY**: Initial Y rotation of the task
* **rotZ**: Initial Z rotation of the task
* **blendInSpeed**: The speed at which the animation blends in. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant
* **blendOutSpeed**: The speed at which the animation blends out. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant
* **duration**: The duration of the animation in milliseconds. -1 will play the animation until canceled
* **flag**: See [`TASK_PLAY_ANIM`](#_0xEA47FE3719165B94)
* **animTime**: Value between 0.0 and 1.0, lets you start an animation from the given point
* **p14**:
* **p15**:
* **blendInSpeed**: The speed at which the animation blends in. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant (default `8.0`)
* **blendOutSpeed**: The speed at which the animation blends out. Lower is slower and higher is faster, -1.0 is normal, -8.0 is basically instant (default `-8.0`)
* **duration**: The duration of the animation in milliseconds. -1 will play the animation until canceled (default `-1`)
* **flag**: See [`TASK_PLAY_ANIM`](#_0xEA47FE3719165B94) (default `0`)
* **animTime**: Value between 0.0 and 1.0, lets you start an animation from the given point (default `0.0`)
* **rotationOrder**: See `eEulerRotationOrder` (default `2`)
* **ikFlags**: See `eIKFlags` (default `0`)

Loading