Raised This Month: $ Target: $400
 0% 

Maybe a problem with SlapPlayer when "kill" cmd is hooked


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sodafr
Member
Join Date: Apr 2007
Location: Paris, France
Old 02-26-2008 , 11:56   Maybe a problem with SlapPlayer when "kill" cmd is hooked
Reply With Quote #1

this is not a real problem... just an interrogation

I have hooked the kill command : it does not kill anyone but blind + beacon
when anticamp slaps a player with health < damage amount my kill function blind and beacon... but it doesn't kill him.
I have modified anticamp script with
Code:
new PlayerHealth = GetClientHealth(client);
if(PlayerHealth > slap_damage_amount)
{
    SlapPlayer(client, slap_damage_amount, true);
}
else
{
    ForcePlayerSuicide(client);
}
but, is it not to sdktool to check for that ?

my 2 cents

Last edited by sodafr; 02-26-2008 at 19:08.
sodafr is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 02-26-2008 , 15:26   Re: Maybe a problem with SlapPlayer with hook kill command
Reply With Quote #2

I belive SlapPlayer already kills player if he does not have enough life.
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
sodafr
Member
Join Date: Apr 2007
Location: Paris, France
Old 02-26-2008 , 17:05   Re: Maybe a problem with SlapPlayer with hook kill command
Reply With Quote #3

Quote:
Originally Posted by Nican View Post
I belive SlapPlayer already kills player if he does not have enough life.
yes it does but...
I have an anticamp plugin who slaps player when they are camping too much
I have another plugin who block the client command "kill" and send to all player the information that "xxx attempted to kill himself"
When "kill" is hooked and blocked then anticamp plugin (most of the time it uses SlapPlayer from sdktools) didnt kill the player anymore... life decrease until 1HP and then the hook (kill) is fired ... but the plyaer is not killed.
sodafr is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-26-2008 , 17:16   Re: Maybe a problem with SlapPlayer with hook kill command
Reply With Quote #4

Sounds like your plugin blocking the kill command is the problem.
bl4nk is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 02-26-2008 , 17:44   Re: Maybe a problem with SlapPlayer with hook kill command
Reply With Quote #5

That's what he's trying to bypass bl4nk.

ForcePlayerSuicide might be getting blocked by that plugin too, although I don't know how ForcePlayerSuicide really works. Your code looks fine to me.
Greyscale is offline
sodafr
Member
Join Date: Apr 2007
Location: Paris, France
Old 02-26-2008 , 19:04   Re: Maybe a problem with SlapPlayer with hook kill command
Reply With Quote #6

Quote:
Originally Posted by bl4nk View Post
Sounds like your plugin blocking the kill command is the problem.
mmm...
Code:
RegConsoleCmd("kill", CheckForKill)

public Action:CheckForKill(client, args)
{
    if(client == 0)
        return Plugin_Continue;
    return Plugin_Stop;
}
You really think it is the problem ?
If I missed something please told me where I am wrong

edit: I have to repeat that when "kill" command is hooked then anticamp slaps continuously the player without killing him (HP stays at 1).

Thanks for your help

Last edited by sodafr; 02-26-2008 at 19:20.
sodafr is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 02-26-2008 , 19:24   Re: Maybe a problem with SlapPlayer when "kill" cmd is hooked
Reply With Quote #7

Haha I can't tell if that's sarcasm or not.
Greyscale is offline
sodafr
Member
Join Date: Apr 2007
Location: Paris, France
Old 02-26-2008 , 19:33   Re: Maybe a problem with SlapPlayer when "kill" cmd is hooked
Reply With Quote #8

Quote:
Originally Posted by Greyscale View Post
Haha I can't tell if that's sarcasm or not.
no sarcasm... I am not aesy with english

I am a rookie at sourcemod scripting then I won't allow myself to be sarcastic
Sorry if it sounds like

Last edited by sodafr; 02-26-2008 at 20:13.
sodafr is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-26-2008 , 22:03   Re: Maybe a problem with SlapPlayer when "kill" cmd is hooked
Reply With Quote #9

I'm pretty sure all that ForcePlayerSuicide() does is just run the 'kill' command on the player. So yes, I really think that's the problem. Try unloading the plugin that's blocking it and see if your new one works.
bl4nk is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 02-26-2008 , 22:56   Re: Maybe a problem with SlapPlayer when "kill" cmd is hooked
Reply With Quote #10

Quote:
Originally Posted by sodafr View Post
no sarcasm... I am not aesy with english

I am a rookie at sourcemod scripting then I won't allow myself to be sarcastic
Sorry if it sounds like
Haha no problem


Yeah bl4nk, that was my guess too, but I thought maybe ForcePlayerSuicide might have been a little bit more than just forcing kill on the client..
Greyscale 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 23:08.


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