Author Topic: What does ".Immunity" do?  (Read 2467 times)

0 Members and 1 Guest are viewing this topic.

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
What does ".Immunity" do?
« on: October 07, 2014, 01:44:22 pm »
Hi,

Recently I saw that there is an entity of .Immunity for both Player and Vehicle.I wanted to know what it does and how do we use it?

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: What does ".Immunity" do?
« Reply #1 on: October 08, 2014, 06:08:59 am »
Hello, Anybody there?

btw, I learned how to use it using the source code but what does it do? Even when i change immunity to 100 nothing happens.
« Last Edit: October 08, 2014, 06:43:08 am by Honey. »

Offline S.L.C

  • Street Thug
  • *
  • Posts: 42
  • Sorry if you weren't impressed!
    • View Profile
Re: What does ".Immunity" do?
« Reply #2 on: October 08, 2014, 01:04:49 pm »
Apparently it's using Bit Fields to enable certain immunity flags/options for those entities. But nobody posted any information on what those bit fields actually turn off or turn on. You might have to ask someone with access to the actual source code or has some knowledge about them.
« Last Edit: October 08, 2014, 03:13:27 pm by S.L.C »

Offline Honey.

  • Made Man
  • ***
  • Posts: 111
    • View Profile
Re: What does ".Immunity" do?
« Reply #3 on: October 08, 2014, 01:21:15 pm »
I'm sure Stormeus &   maxorator, both are senior team members.One of them should help us soon.

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: What does ".Immunity" do?
« Reply #4 on: October 08, 2014, 09:53:43 pm »
Code: [Select]
Binary  | Hex  | Dec | Field
---------------------------------------
0b00001 | 0x1  |  1  | bulletproof
0b00010 | 0x2  |  2  | fireproof
0b00100 | 0x4  |  4  | explosion-proof
0b01000 | 0x8  |  8  | collision-proof
0b10000 | 0x10 |  16 | melee-proof

0 means no immunity to any damage, 31 means immunity to all damage. You can add all the numbers together or use bitwise OR/AND to toggle flags.
Do not PM me for support.