Raised This Month: $2 Target: $400
 0% 

【req】Instant kill for drowning【cs1.6】


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dominannto
New Member
Join Date: Oct 2019
Old 06-19-2020 , 10:15   【req】Instant kill for drowning【cs1.6】
Reply With Quote #1

Hello AlliedModders,
I search alot but i could not found any plugin that makes drowning damage instakill like 99999 damage...
Can anyone make a plugin like that or suggest me any plugin as an alternative?

Thankyou .
dominannto is offline
thEsp
Veteran Member
Join Date: Aug 2017
Location: Land of Eagles
Old 06-19-2020 , 14:35   Re: 【req】Instant kill for drowning【cs1.6】
Reply With Quote #2

Code:
#include <amxmodx> #include <hamsandwich> #define DMG_DROWN (1<<14) public plugin_init() { #if AMXX_VERSION_NUM < 190     RegisterHam(Ham_TakeDamage, "player", "@CBasePlayer_TakeDamage"); #else     RegisterHam(Ham_TakeDamage, "player", "@CBasePlayer_TakeDamage", .specialbot = true); #endif } @CBasePlayer_TakeDamage(pev, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType) {     if (bitsDamageType & DMG_DROWN)     {         user_kill(pev);         return HAM_SUPERCEDE;     }     return HAM_IGNORED; }
Tested on map de_mon and works perfectly fine, but doesn't work on de_survivor (since you get hurt by a specific entity, not water).
thEsp is offline
dominannto
New Member
Join Date: Oct 2019
Old 06-21-2020 , 08:53   Re: 【req】Instant kill for drowning【cs1.6】
Reply With Quote #3

Quote:
Originally Posted by thEsp View Post
Code:
#include <amxmodx> #include <hamsandwich> #define DMG_DROWN (1<<14) public plugin_init() { #if AMXX_VERSION_NUM < 190     RegisterHam(Ham_TakeDamage, "player", "@CBasePlayer_TakeDamage"); #else     RegisterHam(Ham_TakeDamage, "player", "@CBasePlayer_TakeDamage", .specialbot = true); #endif } @CBasePlayer_TakeDamage(pev, pevInflictor, pevAttacker, Float:flDamage, bitsDamageType) {     if (bitsDamageType & DMG_DROWN)     {         user_kill(pev);         return HAM_SUPERCEDE;     }     return HAM_IGNORED; }
Tested on map de_mon and works perfectly fine, but doesn't work on de_survivor (since you get hurt by a specific entity, not water).
Thank you very much. I appreciate it. But it seems this wont work for bots.
I tried to make one for bots based on yours, but I failed.
Code:
#include <amxmodx>
#include <hamsandwich>

#define PLUGIN "X"
#define AUTHOR "X"
#define VERSION "X"

#define DMG_DROWN 1<<14

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

RegisterHam( Ham_TakeDamage, "player", "damage" )
}

public damage(this, idinflictor, idattacker, Float:damage, damagebits)
{
if(damagebits & DMG_DROWN)
user_kill
}
dominannto is offline
thEsp
Veteran Member
Join Date: Aug 2017
Location: Land of Eagles
Old 06-21-2020 , 09:18   Re: 【req】Instant kill for drowning【cs1.6】
Reply With Quote #4

You should upgrade to version 1.9.
thEsp 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 10:35.


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