AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block suicide (https://forums.alliedmods.net/showthread.php?t=170730)

Diegorkable 10-28-2011 10:58

Block suicide
 
How can I block the 'kill' command? (Ofcourse not with hooking it and returning handled)

hleV 10-28-2011 11:01

Re: Block suicide
 
PHP Code:

#include <amxmodx>
#include <engine>

public client_kill()
    return 
PLUGIN_HANDLED

I doubt there's a better way.

dFF 10-28-2011 11:05

Re: Block suicide
 
Fakemeta:

PHP Code:

plugin_int:
register_forwardFM_ClientKill"Fm_Client_KillCommand" )

public 
Fm_Client_KillCommand()
{
    return 
FMRES_SUPERCEDE


Next time, use search button.

Diegorkable 10-28-2011 11:23

Re: Block suicide
 
Can I get a parameter of ID in that function?

public Fm_Client_KillCommand(id)

hleV 10-28-2011 11:45

Re: Block suicide
 
Yes. Fakemeta is not more efficient than Engine, though.

Diegorkable 10-28-2011 11:48

Re: Block suicide
 
Quote:

Originally Posted by hleV (Post 1585000)
Yes. Fakemeta is not more efficient than Engine, though.

I know.


All times are GMT -4. The time now is 14:27.

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