Skip to content

Commit

Permalink
add named parameters and correct types for some natives
Browse files Browse the repository at this point in the history
  • Loading branch information
coalaura committed Sep 22, 2024
1 parent daecc21 commit e7d38a4
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 59 deletions.
4 changes: 2 additions & 2 deletions ENTITY/CreateModelSwap.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ns: ENTITY

```c
// 0x92C47782FDA8B2A3 0x0BC12F9E
void CREATE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, BOOL p6);
void CREATE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, BOOL bSurviveMapReload);
```
```
Expand All @@ -20,5 +20,5 @@ Network players do not see changes done with this.
* **radius**:
* **originalModel**:
* **newModel**:
* **p6**:
* **bSurviveMapReload**:
8 changes: 4 additions & 4 deletions ENTITY/IsEntityAtEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ns: ENTITY

```c
// 0x751B70C3D034E187 0xDABDCB52
BOOL IS_ENTITY_AT_ENTITY(Entity entity1, Entity entity2, float xSize, float ySize, float zSize, BOOL p5, BOOL p6, int p7);
BOOL IS_ENTITY_AT_ENTITY(Entity entity1, Entity entity2, float xSize, float ySize, float zSize, BOOL highlightArea, BOOL do3dCheck, int transportMode);
```
```
Expand All @@ -19,8 +19,8 @@ Last three parameters are almost alwasy p5 = 0, p6 = 1, p7 = 0
* **xSize**:
* **ySize**:
* **zSize**:
* **p5**:
* **p6**:
* **p7**:
* **highlightArea**:
* **do3dCheck**:
* **transportMode**:
## Return value
19 changes: 7 additions & 12 deletions ENTITY/PlayEntityAnim.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ ns: ENTITY

```c
// 0x7FB218262B810701 0x878753D5
BOOL PLAY_ENTITY_ANIM(Entity entity, char* animName, char* animDict, float p3, BOOL loop, BOOL stayInAnim, BOOL p6, float delta, Any bitset);
```
```
delta and bitset are guessed fields. They are based on the fact that most of the calls have 0 or nil field types passed in.
The only time bitset has a value is 0x4000 and the only time delta has a value is during stealth with usually <1.0f values.
BOOL PLAY_ENTITY_ANIM(Entity entity, char* animName, char* animDict, float fBlendDelta, BOOL bLoop, BOOL bHoldLastFrame, BOOL bDriveToPose, float fStartPhase, cs_type(Any) int nFlags);
```
[Animations list](https://alexguirre.github.io/animations-list/)
Expand All @@ -19,11 +14,11 @@ The only time bitset has a value is 0x4000 and the only time delta has a value i
* **entity**:
* **animName**:
* **animDict**:
* **p3**:
* **loop**:
* **stayInAnim**:
* **p6**:
* **delta**:
* **bitset**:
* **fBlendDelta**:
* **bLoop**:
* **bHoldLastFrame**:
* **bDriveToPose**: unused
* **fStartPhase**:
* **nFlags**:
## Return value
14 changes: 5 additions & 9 deletions ENTITY/PlaySynchronizedEntityAnim.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ ns: ENTITY

```c
// 0xC77720A12FE14A86 0x012760AA
BOOL PLAY_SYNCHRONIZED_ENTITY_ANIM(Entity entity, int syncedScene, char* animation, char* propName, float p4, float p5, Any p6, float p7);
```
```
p4 and p7 are usually 1000.0f.
BOOL PLAY_SYNCHRONIZED_ENTITY_ANIM(Entity entity, int syncedScene, char* animation, char* propName, float fBlendInDelta, float fBlendOutDelta, cs_type(Any) int iFlags, float fMoverBlendInDelta);
```
[Animations list](https://alexguirre.github.io/animations-list/)
Expand All @@ -19,9 +15,9 @@ p4 and p7 are usually 1000.0f.
* **syncedScene**:
* **animation**:
* **propName**:
* **p4**:
* **p5**:
* **p6**:
* **p7**:
* **fBlendInDelta**:
* **fBlendOutDelta**:
* **iFlags**:
* **fMoverBlendInDelta**:
## Return value
26 changes: 13 additions & 13 deletions ENTITY/PlaySynchronizedMapEntityAnim.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ ns: ENTITY

```c
// 0xB9C54555ED30FBC4 0xEB4CBA74
BOOL PLAY_SYNCHRONIZED_MAP_ENTITY_ANIM(float p0, float p1, float p2, float p3, Any p4, Any p5, Any* p6, Any* p7, float p8, float p9, Any p10, float p11);
BOOL PLAY_SYNCHRONIZED_MAP_ENTITY_ANIM(float x, float y, float z, float radius, cs_type(Any) int modelHash, cs_type(Any) int sceneId, cs_type(Any*) char* pAnimName, cs_type(Any*) char* pAnimDictName, float fBlendDelta, float fBlendOutDelta, cs_type(Any) int flags, float fMoverBlendInDelta);
```
[Animations list](https://alexguirre.github.io/animations-list/)
## Parameters
* **p0**:
* **p1**:
* **p2**:
* **p3**:
* **p4**:
* **p5**:
* **p6**:
* **p7**:
* **p8**:
* **p9**:
* **p10**:
* **p11**:
* **x**:
* **y**:
* **z**:
* **radius**:
* **modelHash**:
* **sceneId**:
* **pAnimName**:
* **pAnimDictName**:
* **fBlendDelta**:
* **fBlendOutDelta**:
* **flags**:
* **fMoverBlendInDelta**:
## Return value
4 changes: 2 additions & 2 deletions ENTITY/RemoveModelSwap.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ns: ENTITY

```c
// 0x033C0F9A64E229AE 0xCE0AA8BC
void REMOVE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, BOOL p6);
void REMOVE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, BOOL bLazy);
```
Expand All @@ -16,5 +16,5 @@ void REMOVE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalMod
* **radius**:
* **originalModel**:
* **newModel**:
* **p6**:
* **bLazy**:
12 changes: 6 additions & 6 deletions PED/SetPedToRagdoll.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ns: PED

```c
// 0xAE99FB955581844A 0x83CB5052
BOOL SET_PED_TO_RAGDOLL(Ped ped, int time1, int time2, int ragdollType, BOOL p4, BOOL p5, BOOL p6);
BOOL SET_PED_TO_RAGDOLL(Ped ped, int minTime, int maxTime, int ragdollType, BOOL bAbortIfInjured, BOOL bAbortIfDead, BOOL bForceScriptControl);
```
p4/p5: Unusued in TU27
Expand All @@ -17,11 +17,11 @@ p4/p5: Unusued in TU27
## Parameters
* **ped**:
* **time1**: Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1.
* **time2**:
* **minTime**: Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1.
* **maxTime**:
* **ragdollType**:
* **p4**:
* **p5**:
* **p6**:
* **bAbortIfInjured**: unused
* **bAbortIfDead**: unused
* **bForceScriptControl**:
## Return value
34 changes: 23 additions & 11 deletions PED/SetPedToRagdollWithFall.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@ ns: PED

```c
// 0xD76632D99E4966C8 0xFA12E286
BOOL SET_PED_TO_RAGDOLL_WITH_FALL(Ped ped, int time, int p2, int ragdollType, float x, float y, float z, float p7, float p8, float p9, float p10, float p11, float p12, float p13);
BOOL SET_PED_TO_RAGDOLL_WITH_FALL(Ped ped, int minTime, int maxTime, int nFallType, float x, float y, float z, float fGroundHeight, float grab1X, float grab1Y, float grab1Z, float grab2X, float grab2Y, float grab2Z);
```
```cpp
enum eNMFallType {
TYPE_FROM_HIGH = 0,
TYPE_OVER_WALL = 1,
TYPE_DOWN_STAIRS = 2,
TYPE_DIE_TYPES = 3,
TYPE_DIE_FROM_HIGH = 4,
TYPE_DIE_OVER_WALL = 5,
TYPE_DIE_DOWN_STAIRS = 6
}
```

```
Expand All @@ -20,18 +32,18 @@ ped::set_ped_to_ragdoll_with_fall(ped, 1500, 2000, 1, -entity::get_entity_forwar

## Parameters
* **ped**:
* **time**:
* **p2**:
* **ragdollType**:
* **minTime**:
* **maxTime**:
* **nFallType**:
* **x**:
* **y**:
* **z**:
* **p7**:
* **p8**:
* **p9**:
* **p10**:
* **p11**:
* **p12**:
* **p13**:
* **fGroundHeight**:
* **grab1X**:
* **grab1Y**:
* **grab1Z**:
* **grab2X**:
* **grab2Y**:
* **grab2Z**:

## Return value

0 comments on commit e7d38a4

Please sign in to comment.