Raised This Month: $ Target: $400
 0% 

[SOLVED]Removing defuser of the floor


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-03-2009 , 08:19   Re: Removing defuser of the floor
Reply With Quote #1

Method taken from no weapon drop by VEN :

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <engine>

#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin("No Defuser On Ground"VERSION"ConnorMcLeod")

    
register_event("DeathMsg""Event_DeathMsg""a")
}

public 
Event_DeathMsg()
{
    new 
id read_data(2)
    if( 
cs_get_user_defuse(id) )
    {
        
cs_set_user_defuse(id0)
        
entity_set_int(idEV_INT_body0)
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 11-03-2009 at 08:26.
ConnorMcLeod is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-03-2009 , 09:20   Re: Removing defuser of the floor
Reply With Quote #2

Quote:
Originally Posted by ConnorMcLeod View Post
Method taken from no weapon drop by VEN :

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <engine>

#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin("No Defuser On Ground"VERSION"ConnorMcLeod")

    
register_event("DeathMsg""Event_DeathMsg""a")
}

public 
Event_DeathMsg()
{
    new 
id read_data(2)
    if( 
cs_get_user_defuse(id) )
    {
        
cs_set_user_defuse(id0)
        
entity_set_int(idEV_INT_body0)
    }


Thanks.

One question.

In my dedicated server with this code ...
PHP Code:
public Ham_Spawn_WeaponboxPost(Ent) {
        
    if(
get_pcvar_num(enable) == 1
    
&& get_pcvar_num(removeent) == 1
    {
        if(
pev_valid(Ent))
        {
        
engfunc(EngFunc_RemoveEntity,Ent)
       }
        return 
HAM_SUPERCEDE
    
}     
    return 
HAM_IGNORED

works good, but when you use the same on my hosted server crashes,I could fix it with task, but I dont know how to keep unused task.

Last edited by #8 SickneSS; 11-03-2009 at 09:26.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-03-2009 , 09:48   Re: Removing defuser of the floor
Reply With Quote #3

PHP Code:
RegisterHam(Ham_Spawn"weaponbox""WeaponBox_Spawn"1
PHP Code:
public WeaponBox_Spawn(iEnt)
{
    
entity_set_int(iEntEV_INT_flagsFL_KILLME)
    
call_think(iEnt)

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 17:44.


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