News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: Flags IDs  (Read 8033 times)

0 Members and 1 Guest are viewing this topic.

deadpoolXYZ

  • Guest
Flags IDs
« on: March 24, 2015, 12:57:42 PM »
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.5

PedSetFlag(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.




« Last Edit: April 07, 2015, 01:45:46 PM by The Dream Is Dead »

Offline Ky

  • Full Member
  • ***
  • Posts: 329
  • Gender: Male
  • <3
    • View Profile
Re: Flags IDs
« Reply #1 on: March 24, 2015, 01:00:21 PM »
Good tutorial..!


 ;D

Offline SWEGTA

  • Da Forum Luffs Me!
  • *****
  • Posts: 6,422
  • Gender: Male
  • Swee Gee Tee Ayy
    • View Profile
    • Bully & GTA videos
Re: Flags IDs
« Reply #2 on: March 24, 2015, 01:26:20 PM »
Looks like we've got plenty of new stuff to discover.

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Flags IDs
« Reply #3 on: March 24, 2015, 01:58:58 PM »
Sweet! Nice finds, this would of been very helpful in the past when I needed these things..

deadpoolXYZ

  • Guest
Re: Flags IDs
« Reply #4 on: March 24, 2015, 04:58:09 PM »
Looks like we've got plenty of new stuff to discover.

It's a shame that this function was known for so long but nobody experimented with it, considering there are a lot of useful flags.

Sweet! Nice finds, this would of been very helpful in the past when I needed these things..

It's never too late to use them.  ;)

Offline GreenOmnitrix

  • XFire: jedijosh920
  • Full Member
  • ***
  • Posts: 292
  • Gender: Male
  • 欺負改裝是真棒
    • View Profile
    • YouTube Channel
Re: Flags IDs
« Reply #5 on: March 25, 2015, 05:17:21 PM »
I did a bit of testing with the strafe flag (11) and found some interesting results: when not in combat and the flag is set on a ped, they do that same weird strafe/cheering thing like the player does with a fighting style, but once in combat, they start strafing normally. I wonder if there is a flag that initiates combat/aggression?

deadpoolXYZ

  • Guest
Re: Flags IDs
« Reply #6 on: March 25, 2015, 05:45:23 PM »
I did a bit of testing with the strafe flag (11) and found some interesting results: when not in combat and the flag is set on a ped, they do that same weird strafe/cheering thing like the player does with a fighting style, but once in combat, they start strafing normally. I wonder if there is a flag that initiates combat/aggression?

The "cheering" is a generic strafe that every ped has except the player, the dogs, the rats and the punchbag. Peds only perform it while they are spectating a fight but if they join it then something triggers the fighting strafe. That's why when you change your fighting style you get that weird cheer strafe. The problem is that I don't know how many flags are there in the game so maybe if the "initiate fight" flag exists then it could be any number. Another problem would be that the flag can only be applied to peds and not the player.

EDIT: Well... there are at least 132 flags now.
« Last Edit: March 25, 2015, 06:44:17 PM by The Dream Is Dead »

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Flags IDs
« Reply #7 on: March 25, 2015, 07:02:11 PM »
Try this see if anything interesting happens XD

for flag = 0,1000 do
  PedSetFlag(gPlayer,flag,true)
end

deadpoolXYZ

  • Guest
Re: Flags IDs
« Reply #8 on: March 25, 2015, 07:11:43 PM »
Try this see if anything interesting happens XD

for flag = 0,1000 do
  PedSetFlag(gPlayer,flag,true)
end

I tried that before but only for the first 100 flags and my game crashed 2 seconds later.  :P

Then I tried it again without flag 94 but it still crashed. ( ͡° ͜ʖ ͡°)

Offline GreenOmnitrix

  • XFire: jedijosh920
  • Full Member
  • ***
  • Posts: 292
  • Gender: Male
  • 欺負改裝是真棒
    • View Profile
    • YouTube Channel
Re: Flags IDs
« Reply #9 on: March 25, 2015, 08:26:05 PM »
Code: [Select]
F_PedFlag = function()
local Ped = PedGetTargetPed(gPlayer)
  if IsButtonPressed(3,0) and PedIsValid(Ped) then
TextPrintString(PedGetFlag(Ped), 2, 2)
end
end

You could try using this code to get a ped's flags in-game to make finding more easier. I tried it but it crashes my game, lol.

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: Flags IDs
« Reply #10 on: March 25, 2015, 08:32:32 PM »
Code: [Select]
F_PedFlag = function()
local Ped = PedGetTargetPed(gPlayer)
  if IsButtonPressed(3,0) and PedIsValid(Ped) then
TextPrintString(PedGetFlag(Ped), 2, 2)
end
end

You could try using this code to get a ped's flags in-game to make finding more easier. I tried it but it crashes my game, lol.

2 things wrong there. Firstly, you need the flag number in as the 2nd arg and it'll return the value of what that flag is. Secondly, trying to print a boolean value (true/false) will crash the game. Try this

local flag = 90
local ped = PedGetTargetPed()
if not PedIsValid(ped) then ped = gPlayer end
if IsButtonBeingPressed(3,0) then
  local value = PedGetFlag(ped,flag)
  if value == true then
    TextPrintString("true",1,1)
  elseif value == false then
    TextPrintString("false",1,1)
  else
    TextPrintString(value,1,1)
  end
end
end

Offline GreenOmnitrix

  • XFire: jedijosh920
  • Full Member
  • ***
  • Posts: 292
  • Gender: Male
  • 欺負改裝是真棒
    • View Profile
    • YouTube Channel
Re: Flags IDs
« Reply #11 on: March 25, 2015, 08:33:26 PM »
Code: [Select]
F_PedFlag = function()
local Ped = PedGetTargetPed(gPlayer)
  if IsButtonPressed(3,0) and PedIsValid(Ped) then
TextPrintString(PedGetFlag(Ped), 2, 2)
end
end

You could try using this code to get a ped's flags in-game to make finding more easier. I tried it but it crashes my game, lol.

2 things wrong there. Firstly, you need the flag number in as the 2nd arg and it'll return the value of what that flag is. Secondly, trying to print a boolean value (true/false) will crash the game. Try this

local flag = 90
local ped = PedGetTargetPed()
if not PedIsValid(ped) then ped = gPlayer end
if IsButtonBeingPressed(3,0) then
  local value = PedGetFlag(ped,flag)
  if value == true then
    TextPrintString("true",1,1)
  elseif value == false then
    TextPrintString("false",1,1)
  else
    TextPrintString(value,1,1)
  end
end
end

Thanks Daboss!

deadpoolXYZ

  • Guest
Re: Flags IDs
« Reply #12 on: March 25, 2015, 08:34:02 PM »
Code: [Select]
F_PedFlag = function()
local Ped = PedGetTargetPed(gPlayer)
  if IsButtonPressed(3,0) and PedIsValid(Ped) then
TextPrintString(PedGetFlag(Ped), 2, 2)
end
end

You could try using this code to get a ped's flags in-game to make finding more easier. I tried it but it crashes my game, lol.

A ped can have multiple flags enabled/disabled so I suppose that you should ask which flag. It should be something like PedGetFlag(PED, FlagNumber)

This way I should also know if a flag exists or not.

EDIT: Get rekt m8 I was gonna answer him Nice m8  8)

EDIT2: Even though I'm changing flag 37 value to "true" it always stays "false".  :blank:
« Last Edit: March 25, 2015, 08:47:32 PM by The Dream Is Dead »

Offline GreenOmnitrix

  • XFire: jedijosh920
  • Full Member
  • ***
  • Posts: 292
  • Gender: Male
  • 欺負改裝是真棒
    • View Profile
    • YouTube Channel
Re: Flags IDs
« Reply #13 on: March 25, 2015, 09:26:09 PM »
Code: [Select]
F_PedFlag = function()
local Ped = PedGetTargetPed(gPlayer)
  if IsButtonPressed(3,0) and PedIsValid(Ped) then
TextPrintString(PedGetFlag(Ped), 2, 2)
end
end

You could try using this code to get a ped's flags in-game to make finding more easier. I tried it but it crashes my game, lol.

A ped can have multiple flags enabled/disabled so I suppose that you should ask which flag. It should be something like PedGetFlag(PED, FlagNumber)

This way I should also know if a flag exists or not.

EDIT: Get rekt m8 I was gonna answer him Nice m8  8)

EDIT2: Even though I'm changing flag 37 value to "true" it always stays "false".  :blank:

Maybe if you find that aggression/fight initiation flag we can have full strafes without the need of functions  and other overrides.