Skip to content

Commit

Permalink
Some Enum completion (#1160)
Browse files Browse the repository at this point in the history
* traffic light override enum

* explosion enum

* gfx draw order enum

* text font enum

* pause menu states

* gravity level enum

* ped motion states

* resolve motion state hashes

* c codeblocks instead of cpp

* tweak: keep consistent spacing in enums

Co-authored-by: UTIL_TRACELINE <[email protected]>

---------

Co-authored-by: Dillon Skaggs <[email protected]>
Co-authored-by: UTIL_TRACELINE <[email protected]>
  • Loading branch information
3 people authored Aug 14, 2024
1 parent f70ffa6 commit 59c8f9d
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 48 deletions.
19 changes: 12 additions & 7 deletions ENTITY/SetEntityTrafficlightOverride.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ ns: ENTITY
void SET_ENTITY_TRAFFICLIGHT_OVERRIDE(Entity entity, int state);
```
```
Example here: www.gtaforums.com/topic/830463-help-with-turning-lights-green-and-causing-peds-to-crash-into-each-other/#entry1068211340
0 = green
1 = red
2 = yellow
3 = reset changes
changing lights may not change the behavior of vehicles
Changing traffic-lights will not change the behavior of NPCs.
Example: [here](https://www.gtaforums.com/topic/830463-help-with-turning-lights-green-and-causing-peds-to-crash-into-each-other/#entry1068211340)
```c
enum eTrafficlightOverrideMode
{
TLO_RED = 0,
TLO_AMBER = 1,
TLO_GREEN = 2,
TLO_NONE = 3
}
```

## Parameters
Expand Down
7 changes: 4 additions & 3 deletions FIRE/AddExplosion.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,14 @@ enum class eExplosionTag : uint32_t
EXP_TAG_RCTANK_ROCKET = 73,
EXP_TAG_BOMB_WATER = 74,
EXP_TAG_BOMB_WATER_SECONDARY = 75,
_0xF728C4A9 = 76,
_0xBAEC056F = 77,
EXP_TAG_MINE_CNCSPIKE = 76,
EXP_TAG_BZGAS_MK2 = 77,
EXP_TAG_FLASHGRENADE = 78,
EXP_TAG_STUNGRENADE = 79,
_0x763D3B3B = 80,
EXP_TAG_CNC_KINETICRAM = 80,
EXP_TAG_SCRIPT_MISSILE_LARGE = 81,
EXP_TAG_SUBMARINE_BIG = 82,
EXP_TAG_EMPLAUNCHER_EMP = 83,
};
```

Expand Down
15 changes: 15 additions & 0 deletions GRAPHICS/SetScriptGfxDrawOrder.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ GRAPHICS::DRAW_RECT(0.5, 0.5, 3.0, 3.0, v_4, v_5, v_6, a_0._f172, 0);
GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(1);
GRAPHICS::DRAW_RECT(0.5, 0.5, 1.5, 1.5, 0, 0, 0, 255, 0);
```c
enum eGfxDrawOrder
{
GFX_ORDER_BEFORE_HUD_PRIORITY_LOW = 0,
GFX_ORDER_BEFORE_HUD = 1,
GFX_ORDER_BEFORE_HUD_PRIORITY_HIGH = 2,
GFX_ORDER_AFTER_HUD_PRIORITY_LOW = 3,
GFX_ORDER_AFTER_HUD = 4,
GFX_ORDER_AFTER_HUD_PRIORITY_HIGH = 5,
GFX_ORDER_AFTER_FADE_PRIORITY_LOW = 6,
GFX_ORDER_AFTER_FADE = 7,
GFX_ORDER_AFTER_FADE_PRIORITY_HIGH = 8,
}
```

## Parameters
* **order**: The intended draw order/layer.

22 changes: 12 additions & 10 deletions HUD/GetPauseMenuState.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ ns: HUD
int GET_PAUSE_MENU_STATE();
```

```
Returns:
0
5
10
15
20
25
30
35
```c
enum ePauseMenuState
{
PM_INACTIVE = 0,
PM_STARTING_UP = 5,
PM_RESTARTING = 10,
PM_READY = 15,
PM_IN_STORE = 20,
PM_IN_SC_MENU = 25,
PM_SHUTTING_DOWN = 30,
PM_IN_VIDEOEDITOR = 35,
}
```

## Return value
15 changes: 13 additions & 2 deletions HUD/SetTextFont.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,19 @@ ns: HUD
void SET_TEXT_FONT(int fontType);
```
```
fonts that mess up your text where made for number values/misc stuff
```c
enum eTextFonts
{
FONT_STANDARD = 0,
FONT_CURSIVE = 1,
FONT_ROCKSTAR_TAG = 2,
FONT_LEADERBOAR0D = 3,
FONT_CONDENSED = 4,
FONT_STYLE_FIXED_WIDTH_NUMBERS = 5,
FONT_CONDENSED_NOT_GAMERNAME = 6,
FONT_STYLE_PRICEDOWN = 7,
FONT_STYLE_TAXI = 8,
}
```

## Parameters
Expand Down
14 changes: 8 additions & 6 deletions MISC/SetGravityLevel.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ ns: MISC
void SET_GRAVITY_LEVEL(int level);
```
```
level can be from 0 to 3
0: 9.8
1: 2.4
2: 0.1 - very low
3: 0.0
```c
enum eGravityLevel
{
GRAV_EARTH = 0, // earth gravity 9.8m/s2
GRAV_MOON = 1, // moon gravity 2.4m/s2
GRAV_LOW = 2, // very low gravity
GRAV_ZERO = 3 // zero gravity
}
```

## Parameters
Expand Down
42 changes: 22 additions & 20 deletions PED/ForcePedMotionState.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,28 @@ ns: PED
BOOL FORCE_PED_MOTION_STATE(Ped ped, Hash motionStateHash, BOOL p2, cs_type(BOOL) int p3, BOOL p4);
```
```
Some motionstate hashes are
0xec17e58 (standing idle), 0xbac0f10b (nothing?), 0x3f67c6af (aiming with pistol 2-h), 0x422d7a25 (stealth), 0xbd8817db, 0x916e828c
and those for the strings
"motionstate_idle", "motionstate_walk", "motionstate_run", "motionstate_actionmode_idle", and "motionstate_actionmode_walk".
Regarding p2, p3 and p4: Most common is 0, 0, 0); followed by 0, 1, 0); and 1, 1, 0); in the scripts. p4 is very rarely something other than 0.
[31/03/2017] ins1de :
enum MotionState
{
StopRunning = -530524,
StopWalking = -668482597,
Idle = 247561816, // 1, 1, 0
Idl2 = -1871534317,
SkyDive =-1161760501, // 0, 1, 0
Stealth = 1110276645,
Sprint = -1115154469,
Swim = -1855028596,
Unknown1 = 1063765679,
Unknown2 = -633298724,
}
```c
enum ePedMotionState
{
MS_ON_FOOT_IDLE = -1871534317, // motionstate_idle
MS_ON_FOOT_WALK = -668482597, // motionstate_walk
MS_ON_FOOT_RUN = -530524, // motionstate_run
MS_ON_FOOT_SPRINT = -1115154469, // motionstate_sprint
MS_CROUCH_IDLE = 1140525470, // motionstate_crouch_idle
MS_CROUCH_WALK = 147004056, // motionstate_crouch_walk
MS_CROUCH_RUN = 898879241, // motionstate_crouch_run
MS_DO_NOTHING = 247561816, // motionstate_donothing
MS_DIVING_IDLE = 1212730861, // motionstate_diving_idle
MS_DIVING_SWIM = -1855028596, // motionstate_diving_swim
MS_PARACHUTING = -1161760501, // motionstate_parachuting
MS_AIMING = 1063765679, // motionstate_aiming
MS_ACTIONMODE_IDLE = -633298724, // motionstate_actionmode_idle
MS_ACTIONMODE_WALK = -762290521, // motionstate_actionmode_walk
MS_ACTIONMODE_RUN = 834330132, // motionstate_actionmode_run
MS_STEALTHMODE_IDLE = 1110276645, // motionstate_stealth_idle
MS_STEALTHMODE_WALK = 69908130, // motionstate_stealth_walk
MS_STEALTHMODE_RUN = -83133983, // motionstate_stealth_run
}
```

## Parameters
Expand Down

0 comments on commit 59c8f9d

Please sign in to comment.