Raised This Month: $12 Target: $400
 3% 

One hit kill awp!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SnowHP
Senior Member
Join Date: Sep 2016
Location: Porto, Portugal
Old 05-31-2018 , 16:34   One hit kill awp!
Reply With Quote #1

Hello guys I want a one hit kill awp shot?

Like this: https://forums.alliedmods.net/showthread.php?p=1799680

You know some plugin or can make me a new one or even modify this?
__________________
SnowHP is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 05-31-2018 , 23:12   Re: One hit kill awp!
Reply With Quote #2

Untested.
Attached Files
File Type: sp Get Plugin or Get Source (1hitkillawp.sp - 685 views - 1.4 KB)
Drixevel is offline
SnowHP
Senior Member
Join Date: Sep 2016
Location: Porto, Portugal
Old 06-01-2018 , 10:05   Re: One hit kill awp!
Reply With Quote #3

Its working! Thanks a lottttt <3
__________________
SnowHP is offline
SnowHP
Senior Member
Join Date: Sep 2016
Location: Porto, Portugal
Old 07-14-2018 , 20:34   Re: One hit kill awp!
Reply With Quote #4

Can someone fix the plugin pls? HE is taking 1000hp too !
__________________
SnowHP is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 07-15-2018 , 05:12   Re: One hit kill awp!
Reply With Quote #5

Try this
Attached Files
File Type: sp Get Plugin or Get Source (1hitkillawp.sp - 494 views - 1.4 KB)
__________________
micapat is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-15-2018 , 11:11   Re: One hit kill awp!
Reply With Quote #6

PHP Code:
#include <sourcemod>

#pragma semicolon 1

public void OnPluginStart()
{
    
HookEvent("player_hurt"Event_Hurt);
}

public 
Action Event_Hurt(Event hEvent, const char[] sNamebool bDontBroadcast)
{
    
int iAttacker GetClientOfUserId(hEvent.GetInt("attacker"));
    
    
int iClient GetClientOfUserId(hEvent.GetInt("userid"));
    
    
char sWeapon[32];
    
    
GetClientWeapon(iAttackersWeaponsizeof(sWeapon));
    
    if (
StrEqual(sWeapon"weapon_awp"))
    {
        
SetEntityHealth(iClient0);
    }
    
    return 
Plugin_Continue;


Last edited by mug1wara; 07-15-2018 at 11:12.
mug1wara is offline
LenHard
Senior Member
Join Date: Jan 2016
Old 07-16-2018 , 02:20   Re: One hit kill awp!
Reply With Quote #7

Quote:
Originally Posted by mug1wara View Post
PHP Code:
#include <sourcemod>

#pragma semicolon 1

public void OnPluginStart()
{
    
HookEvent("player_hurt"Event_Hurt);
}

public 
Action Event_Hurt(Event hEvent, const char[] sNamebool bDontBroadcast)
{
    
int iAttacker GetClientOfUserId(hEvent.GetInt("attacker"));
    
    
int iClient GetClientOfUserId(hEvent.GetInt("userid"));
    
    
char sWeapon[32];
    
    
GetClientWeapon(iAttackersWeaponsizeof(sWeapon));
    
    if (
StrEqual(sWeapon"weapon_awp"))
    {
        
SetEntityHealth(iClient0);
    }
    
    return 
Plugin_Continue;

Setting the player's health to 0 is a bad idea, plus it wouldn't kill him.

Use SDKHooks_TakeDamage with very high damage, easier and cleaner.

Also you don't really need to hook Action for events that you aren't returning any values such as in this case.

PHP Code:
public Action Event_Hurt(Event hEvent, const char[] sNamebool bDontBroadcast
To
PHP Code:
public void Event_Hurt(Event hEvent, const char[] sNamebool bDontBroadcast
and remove the unnecessary return Plugin_Continue;
__________________

Last edited by LenHard; 07-16-2018 at 02:56.
LenHard is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-16-2018 , 07:05   Re: One hit kill awp!
Reply With Quote #8

It would kill him, to be honest actually never got in to sdkhooks "properly"
mug1wara is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-17-2018 , 09:50   Re: One hit kill awp!
Reply With Quote #9

Quote:
Originally Posted by mug1wara View Post
It would kill him, to be honest actually never got in to sdkhooks "properly"
If I don't remember wrong... set player health to 0 turns him in spectator mode.
It's better give damage to avoid bugs.
__________________
Do not Private Message @me
Bacardi is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 07-17-2018 , 10:23   Re: One hit kill awp!
Reply With Quote #10

Quote:
Originally Posted by Bacardi View Post
If I don't remember wrong... set player health to 0 turns him in spectator mode.
It's better give damage to avoid bugs.
In cs:s (before OB) it was more of a weird state of couldn't kill the person and the person unable to move until he used the "kill" command.
Mitchell is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:36.


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