Vice City Multiplayer

VC:MP 0.4 (Beta) => Script Discussion => Topic started by: Honey. on October 07, 2014, 01:44:22 pm

Title: What does ".Immunity" do?
Post by: Honey. 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?
Title: Re: What does ".Immunity" do?
Post by: Honey. 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.
Title: Re: What does ".Immunity" do?
Post by: S.L.C on October 08, 2014, 01:04:49 pm
Apparently it's using Bit Fields (http://forum.codecall.net/topic/56591-bit-fields-flags-tutorial-with-example/) 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.
Title: Re: What does ".Immunity" do?
Post by: Honey. 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.
Title: Re: What does ".Immunity" do?
Post by: stormeus 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.