Well... not many people talked about this function nor they know what it does so I created this thread to give a little explanation and a list of them. Some people might find them useful for their mods so take a look.
PedSetFlag is a function that can be applied to the player and peds (mostly peds), enabling/disabling certain features and other weird things. As far as I know there are at least 136 flags, assuming they ALL work from 1 to 136, thing that I haven't been able to find out yet.
Madman gave a little explanation about this function in this thread, although he only mentioned very few flags:
http://www.bully-board.com/index.php?topic=20818.5PedSetFlag(PED, Number, true/flase)
PED = can be gPlayer or any other ped we created previously in our script.
Number = each number alters the game/player/ped in different ways (I actually found some flags that seems to do the same things as others).
True/False = Enable/Disable the flag
Here are the flags I have found so far:
2) Crouch
3) Low crouch camera
8 ) Buged running
9) Invisibility
10) Go through peds
11) Strafe
17) Disable controls
18) Always display ped health (only peds)19) Peds don't fight back (only peds)20) Invincibility (only peds)21) Can't attack, change weapon or shoot
23) Peds ignore conversations
24) Infinite ammo
27) Peds never block (only peds)30) Infinite health
(if set to ped then invincibility)31) Random animation (only peds) (run and stop, look around, shoulder barge)33) Ped starts fight with nearest ped (only peds) (complete mayhem?)36) Stand parallel to ground
38) Russell headbutt doesn't crash against wall (only peds)39) Jump camera
40) Same as 10?
43) Go through walls
46) Running camera
50) Item interactions disabled (lockers, doors, etc)
51) Same as 46?
58) Can't get busted
60) Point finger animation and insult (only peds)61) Auto locked target
62) Disable clock
64) Wheel steering controls
65) Interact with last thing you interacted (ped animation if too far)
69) Enable payment to hireable peds/give flowers (only peds) (after payment they don't follow you)70) Jump disabled
75) Social actions disabled
77) Peds run to you when fighting rather than strafe (only peds)82) Ped run to nearest ped (peds only) (sometimes bully or insult that ped)84) Enable kissing (only peds)87) Disable locking target
88) Buged running (similar to 8 but not the same)
91) Same as 64?
94) Game crashes
100) Hide healthbar (only peds)108) Peds don't fight back (any ped to jimmy)
110) Prefects don't chase you and
enable errand icon in social menu (only peds) (true)113) Disable jimmy's voice
117) Prefects don't chase you (false)
129) Disable ped's voice (only peds)132) Disable positive social interaction (only peds)Notes:
-Flags 8, 10, 21, 40, 43, 117 must be set to "false" to work
-Flags in red only works when applied to a PED not to gPlayer. (PedSetFlag(LockedPed, 20, true))
-Some flags might have inaccurate names (such as 38 or 69) and/or need more testing.
-There are some flags (for example flag 1 and 37) that have a fixed value... in other words you cannot change it. Starting from flag 137 onwards ALL flags have a fixed value. What's even more weird is that some flags value can only be changed for peds and not for the player. For example you can set flag 28 to "true" for a ped but if you try it with gPlayer it will always stay "false". Another weird thing is that if flag 31 (and probably other ones) is set to "true", it still stays "false" but the flag's function works anyway (the animation that only peds can perform).
The flags are:
Always true: 1
Always false: 4, 12, 26, 37, 95, 101, 102, 103, 104, 112, 118
Always true for gPlayer only: 81
Always false for gPlayer only: 28, 44, 121
Keep in mind that I will update this list every time I find something new... you can help too if you want.