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

Solved [ H3LP ] DLLFunc_ClientKill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 05-09-2018 , 06:52   [ H3LP ] DLLFunc_ClientKill
Reply With Quote #1

Hello. So I made an Opposing Force EntMod server and I'm having issues with DLLFunc_ClientKill.

Code:
stock SetUserHealth(iID, iValue) {     if(!is_user_connected(iID))         return 0;         new Float: flHealth;         flHealth = float(iValue);         if(flHealth > 0)         set_pev(iID, pev_health, flHealth);     else     {         dllfunc(DLLFunc_ClientKill, iID);                 if(is_user_alive(iID))         {             set_pev(iID, pev_health, 0.0);             ExecuteHam(Ham_Killed, iID, iID, false);         }     }         return 1; }

The problem is that nothing happens when I hook it, while in other games it works fine. Also noticed that the kill command doesn't work on Opposing Force. Any ideas? Thanks !

Last edited by DarthMan; 05-09-2018 at 14:28. Reason: Solved
DarthMan is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-09-2018 , 07:24   Re: [ H3LP ] DLLFunc_ClientKill
Reply With Quote #2

Setting user health to negative will also kill him
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DarthMan
Veteran Member
Join Date: Aug 2011
Old 05-09-2018 , 07:33   Re: [ H3LP ] DLLFunc_ClientKill
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
Setting user health to negative will also kill him
If it's set to 0, it gets kinda killed but the player can't respawn and jump still works.
DarthMan is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-09-2018 , 08:58   Re: [ H3LP ] DLLFunc_ClientKill
Reply With Quote #4

Set it To negative not zero
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DarthMan
Veteran Member
Join Date: Aug 2011
Old 05-09-2018 , 12:41   Re: [ H3LP ] DLLFunc_ClientKill
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
Set it To negative not zero
Fixed, but I had to execute Ham_Killed and set health to 0 . Thanks anyways :-)
DarthMan is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-09-2018 , 13:03   Re: [ H3LP ] DLLFunc_ClientKill
Reply With Quote #6

If you executed ham killed there is no need to set his hp to 0
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DarthMan
Veteran Member
Join Date: Aug 2011
Old 05-09-2018 , 14:27   Re: [ H3LP ] DLLFunc_ClientKill
Reply With Quote #7

Quote:
Originally Posted by Natsheh View Post
If you executed ham killed there is no need to set his hp to 0
In Op4, there is because if I don't do it the player can still move and walk while dead for whatever reasons and also his HP indicates the old amount the player had before being killed. In other games this doesn't happen, it's just related to OP4. Also a plus for OP4 is that slowhacking can't be used. I don't know how that's possible since in all other goldsrc games it can be used, but it's good to know that Gearbox cares more about games than Valve does.
DarthMan is offline
Reply



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:51.


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