Author Topic: Vehicle Damage  (Read 1853 times)

0 Members and 1 Guest are viewing this topic.

Fishgun123

  • Online Villain
  • ***
  • Posts: 223
    • View Profile
Vehicle Damage
« on: June 08, 2012, 12:51:24 am »
Hi guys, this god mode code I use i'd thought that it would work for your cars too. So your car would never get damaged because of this: the part where it saids vehicle player. I don't know if it's possible but I think anything really possible so, please let me know. Thanks.

(vehicle player) setDamage 0;
player setDamage 0;

if (isnil ("gdmode1on")) then
{
   gdmode1on = 0;
};

if (gdmode1on==0) then
{
   (vehicle player) addEventHandler ["handleDamage", { false }];   
   gdmode1on=1;
   hint "God Mode On";
}
else
{
   (vehicle player) addEventHandler ["handleDamage", { true }];   
   (vehicle player) removeAllEventHandlers "handleDamage";
   gdmode1on=0;
   hint "God Mode Off";
};

augdog99

  • Poptart
  • *
  • Posts: 2
    • View Profile
Re: Vehicle Damage
« Reply #1 on: June 11, 2012, 03:52:10 am »
It is possible. You should look at event handler "HandleDamage".

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: Vehicle Damage
« Reply #2 on: June 11, 2012, 01:16:15 pm »
you can stop vehicles exploding very easily , but il let the 'elite' people work it out , im quite happy using it for myself at the moment.  :smile
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

skovkatten

  • Cheater Apprentice
  • *
  • Posts: 23
    • View Profile
Re: Vehicle Damage
« Reply #3 on: June 11, 2012, 05:13:41 pm »
If you can't get it working, I just use this simple script for easy repair/refuel:

(vehicle player) setFuel 1;
(vehicle player) setDamage 0;

Just spam it whenever your vehicle gets damaged.

Fury

  • Online Villain
  • ***
  • Posts: 124
  • i̺͇̯̟̗m̤̬p͈̠̖o̫̭̦̼ͅrt͈̝̞ antigravity
    • View Profile
Re: Vehicle Damage
« Reply #4 on: June 11, 2012, 05:17:03 pm »
If you can't get it working, I just use this simple script for easy repair/refuel:

(vehicle player) setFuel 1;
(vehicle player) setDamage 0;

Just spam it whenever your vehicle gets damaged.

Or, if you want to be a real boss

Code: [Select]
thegame = true;
while {thegame} do
{
(vehicle player) setFuel 1;
(vehicle player) setDamage 0;
sleep 0.1;
};

Protip dayz players
Don't do (vehicle player) addEventHandler ["handleDamage", { false }];
Don't do player addEventHandler ["handleDamage", { false }]; either.
Both of those exact lines are in the code restriction script on most dayz servers.
 
My programming language is common sense and communication. ♥

skovkatten

  • Cheater Apprentice
  • *
  • Posts: 23
    • View Profile
Re: Vehicle Damage
« Reply #5 on: June 11, 2012, 05:18:11 pm »
If you can't get it working, I just use this simple script for easy repair/refuel:

(vehicle player) setFuel 1;
(vehicle player) setDamage 0;

Just spam it whenever your vehicle gets damaged.

Or, if you want to be a real boss

This one refreshes the repair/refuel every 0.1 second then? Nice!
Code: [Select]
thegame = true;
while {thegame} do
{
(vehicle player) setFuel 1;
(vehicle player) setDamage 0;
sleep 0.1;
};

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: Vehicle Damage
« Reply #6 on: June 11, 2012, 05:21:11 pm »
If you can't get it working, I just use this simple script for easy repair/refuel:

(vehicle player) setFuel 1;
(vehicle player) setDamage 0;

Just spam it whenever your vehicle gets damaged.

Or, if you want to be a real boss

Code: [Select]
thegame = true;
while {thegame} do
{
(vehicle player) setFuel 1;
(vehicle player) setDamage 0;
sleep 0.1;
};

Protip dayz players
Don't do (vehicle player) addEventHandler ["handleDamage", { false }];
Don't do player addEventHandler ["handleDamage", { false }]; either.
 

or even 'bosser'

while {true} do
{
(vehicle player) setFuel 1;
(vehicle player) setDamage 0;
sleep 0.01;
};
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

Fury

  • Online Villain
  • ***
  • Posts: 124
  • i̺͇̯̟̗m̤̬p͈̠̖o̫̭̦̼ͅrt͈̝̞ antigravity
    • View Profile
Re: Vehicle Damage
« Reply #7 on: June 11, 2012, 05:23:02 pm »
or even 'bosser'

while {true} do
{
(vehicle player) setFuel 1;
(vehicle player) setDamage 0;
sleep 0.01;
};

Wow Medic get your feet off my balls you're crushing them.  :icon_cry2
My programming language is common sense and communication. ♥

MrMedic

  • MasstKer
  • ********
  • Posts: 8900
  • programmer/dev/software engineer
    • View Profile
Re: Vehicle Damage
« Reply #8 on: June 11, 2012, 05:25:59 pm »
or even 'bosser'

while {true} do
{
(vehicle player) setFuel 1;
(vehicle player) setDamage 0;
sleep 0.01;
};

Wow Medic get your feet off my balls you're crushing them.  :icon_cry2

Anytime.  :smile
EnCoded Message: i3iy9yl8kr2xf3g2Txs3pr6ye3ya7jg5ty2z

https://www.youtube.com/watch?v=62_7-AYfdkQ
you need a paypal account for the private versions.

Website:
http://bit.ly/medic101

Teamspeak 3: 85.236.101.5:10157

RobJones

  • Poptart
  • *
  • Posts: 6
    • View Profile
Re: Vehicle Damage
« Reply #9 on: June 14, 2012, 01:19:08 am »
If you can't get it working, I just use this simple script for easy repair/refuel:

(vehicle player) setFuel 1;
(vehicle player) setDamage 0;

Just spam it whenever your vehicle gets damaged.

Or, if you want to be a real boss

Code: [Select]
thegame = true;
while {thegame} do
{
(vehicle player) setFuel 1;
(vehicle player) setDamage 0;
sleep 0.1;
};

Protip dayz players
Don't do (vehicle player) addEventHandler ["handleDamage", { false }];
Don't do player addEventHandler ["handleDamage", { false }]; either.
 

or even 'bosser'

while {true} do
{
(vehicle player) setFuel 1;
(vehicle player) setDamage 0;
sleep 0.01;
};

According to Rocket (in his moronic wisdom), vehicle damage reporting to the master server takes priority over everything else. So you might end up breaking everybody else's reporting if you spam that command.

Quote
Performance and Optimization

- Reduction/elimination of the new server lag. This is caused by the ArmA2 server expecting immediate response from the central server. Vehicles are the main cause of this, as whenever they are damaged everything stops while the server ensures this is recorded in the database.

Coronel_Niel

  • Insane Joker
  • ****
  • Posts: 846
  • Why can't I pick my own profile picture...
    • View Profile
Re: Vehicle Damage
« Reply #10 on: June 14, 2012, 01:21:50 am »
If you can't get it working, I just use this simple script for easy repair/refuel:

(vehicle player) setFuel 1;
(vehicle player) setDamage 0;

Just spam it whenever your vehicle gets damaged.

Or, if you want to be a real boss

Code: [Select]
thegame = true;
while {thegame} do
{
(vehicle player) setFuel 1;
(vehicle player) setDamage 0;
sleep 0.1;
};

Protip dayz players
Don't do (vehicle player) addEventHandler ["handleDamage", { false }];
Don't do player addEventHandler ["handleDamage", { false }]; either.
 

or even 'bosser'

while {true} do
{
(vehicle player) setFuel 1;
(vehicle player) setDamage 0;
sleep 0.01;
};

According to Rocket (in his moronic wisdom), vehicle damage reporting to the master server takes priority over everything else. So you might end up breaking everybody else's reporting if you spam that command.

Quote
Performance and Optimization

- Reduction/elimination of the new server lag. This is caused by the ArmA2 server expecting immediate response from the central server. Vehicles are the main cause of this, as whenever they are damaged everything stops while the server ensures this is recorded in the database.


No, it's because they made it so that while the server is talking the database the entire game freeze's. Then it has to catch up when it gets back, causing fuckery. If you repeatedly set the damage of a vehicle +0.1 and then -0.1 you should lag a server pritty hard without any effort.
"Now we are going to watch my boys do it" - Joopig

RobJones

  • Poptart
  • *
  • Posts: 6
    • View Profile
Re: Vehicle Damage
« Reply #11 on: June 14, 2012, 01:32:18 am »
No, it's because they made it so that while the server is talking the database the entire game freeze's. Then it has to catch up when it gets back, causing fuckery. If you repeatedly set the damage of a vehicle +0.1 and then -0.1 you should lag a server pritty hard without any effort.

Their database is actually a ~200 meg file that is continually appended whenever somebody adds something. Additionally, characters aren't stored by actual player ID but by an internal character designation; which, again, has its own table translating Arma player ID to character ID. So whenever you enter or disconnect from a server (or die), you get your info added again.

Yep. Great database architecture there.

Side note, unlike the older vehicle spawn list which had about 10 different possible sets to use, they were horrendously lazy and set all newer vehicles to spawn in the same location. On every server.