AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Knife Headshot (https://forums.alliedmods.net/showthread.php?t=146685)

Blunr552 12-30-2010 17:53

Knife Headshot
 
Is it possible to write a plugin when someone get knifed, that the counter part will get a headshot no matter what?

Like 1 knifeattack, 1 kill :)

Elusive138 12-30-2010 22:17

Re: Knife Headshot
 
http://forums.alliedmods.net/showthread.php?t=66076

Read the whole thing, especially the "A Potentially Evil Plugin" section. Just add a check for the attacker's weapon.

If you just want to 1hit kill and don't really need the headshot, you can
PHP Code:

register_event("Damage""FwdDamage","be","2!0"

, check if attacker has knife and make him do 100 damage or whatever the victim's hp is.

GXLZPGX 12-30-2010 22:46

Re: Knife Headshot
 
Quote:

Originally Posted by Elusive138 (Post 1382809)
http://forums.alliedmods.net/showthread.php?t=66076

Read the whole thing, especially the "A Potentially Evil Plugin" section. Just add a check for the attacker's weapon.

If you just want to 1hit kill and don't really need the headshot, you can
PHP Code:

register_event("Damage""FwdDamage","be","2!0"

, check if attacker has knife and make him do 100 damage or whatever the victim's hp is.

No need to change the damage.

PHP Code:

user_silentkill(victimid

or
PHP Code:

user_kill(victimid

will do the trick.

Blunr552 12-30-2010 23:18

Re: Knife Headshot
 
Quote:

Originally Posted by Elusive138 (Post 1382809)
http://forums.alliedmods.net/showthread.php?t=66076

Read the whole thing, especially the "A Potentially Evil Plugin" section. Just add a check for the attacker's weapon.

If you just want to 1hit kill and don't really need the headshot, you can
PHP Code:

register_event("Damage""FwdDamage","be","2!0"

, check if attacker has knife and make him do 100 damage or whatever the victim's hp is.

thanks! :)

Was easy cake :D

plugin works with headshot ^^ But i made a version where i only did more dmg to the knifeattack, was easier :D


All times are GMT -4. The time now is 02:06.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.