Page 1 of 1

F1 pressed + 1 shot kill

Posted: September 30th, 2010, 8:13 pm
by Moustache
I have 2 questions. I hope someone can and wants to help me :)

1. How can you check if a player presses F1?
I know how to check if a player presses +melee etc, but now how to check if he presses F1 or F2.

2. How can you set it that when you hit a player (in his hand for example) he always dies?
I tried it with self.maxhealth = 20;
But then you get the effect when you got injured, the red flashing screen and the sound effect.

Re: F1 pressed + 1 shot kill

Posted: September 30th, 2010, 11:18 pm
by Drofder2004
Moustache wrote:I have 2 questions. I hope someone can and wants to help me :)

1. How can you check if a player presses F1?
I know how to check if a player presses +melee etc, but now how to check if he presses F1 or F2.

2. How can you set it that when you hit a player (in his hand for example) he always dies?
I tried it with self.maxhealth = 20;
But then you get the effect when you got injured, the red flashing screen and the sound effect.
1. Not possible.
2. Inside the "playerDamage(" function you could add:

iDamage = self.health;

Re: F1 pressed + 1 shot kill

Posted: October 1st, 2010, 7:51 am
by Moustache
Drofder2004 wrote:
Moustache wrote:I have 2 questions. I hope someone can and wants to help me :)

1. How can you check if a player presses F1?
I know how to check if a player presses +melee etc, but now how to check if he presses F1 or F2.

2. How can you set it that when you hit a player (in his hand for example) he always dies?
I tried it with self.maxhealth = 20;
But then you get the effect when you got injured, the red flashing screen and the sound effect.
1. Not possible.
2. Inside the "playerDamage(" function you could add:

iDamage = self.health;
Ok, thanks.