request_method
New Member
- Messages
- 4
- Reaction score
- 1
- Points
- 3
Is there a way to see when a player melees (a notify like reload_start)? And who he melees?
You can use self meleeButtonPressed() to get when someone is knifing. For what exactly do you want to use the script?Is there a way to see when a player melees (a notify like reload_start)? And who he melees?
function example()
{
for(;;)
{
if(self meleeButtonPressed())
self thread doDamageToPlayer(); //to the player I hit
//wait until I can knife someone again
}
}
//or
function example()
{
while(self meleeButtonPressed())
{
self thread doDamageToPlayer();
//wait until I can knife someone again
}
}
So you want to kill someone with just one melee?If I use self meleeButtonPressed() I'd have to do something like this:
You could say I'm trying to increase melee damage or kill any player by knifing himCode:function example() { for(;;) { if(self meleeButtonPressed()) self thread doDamageToPlayer(); //to the player I hit //wait until I can knife someone again } } //or function example() { while(self meleeButtonPressed()) { self thread doDamageToPlayer(); //wait until I can knife someone again } }