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

Defuse Kits on Ground


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-19-2011 , 21:42   Defuse Kits on Ground
Reply With Quote #1

Whats the best method to remove them from the ground??

For some reason registering touch of "player" doesnt trigger when picking up the difuser from the ground so im not sure of a class name and not much on the forums other then

cs_set_user_defuse(id, 1/0)
Doc-Holiday is offline
Fedde
BANNED
Join Date: Sep 2011
Old 09-19-2011 , 22:52   Re: Defuse Kits on Ground
Reply With Quote #2

Use this in DeadMsg event.
Code:
cs_set_user_defuse(id,0); entity_set_int(id,EV_INT_body,0);
Fedde is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-19-2011 , 22:58   Re: Defuse Kits on Ground
Reply With Quote #3

Quote:
Originally Posted by Fedde View Post
Use this in DeadMsg event.
Code:
cs_set_user_defuse(id,0); entity_set_int(id,EV_INT_body,0);
im using Ham_Killed and even in pre it wont remove them theres things i use Ham for that cant be done in deathmsg so i would like to find a way to remove them from the ground if possible.
Doc-Holiday is offline
Fedde
BANNED
Join Date: Sep 2011
Old 09-19-2011 , 22:59   Re: Defuse Kits on Ground
Reply With Quote #4

Quote:
Originally Posted by Doc-Holiday View Post
im using Ham_Killed and even in pre it wont remove them theres things i use Ham for that cant be done in deathmsg so i would like to find a way to remove them from the ground if possible.
Then make a task,check the entity,and remove it.
Fedde is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-19-2011 , 23:01   Re: Defuse Kits on Ground
Reply With Quote #5

Quote:
Originally Posted by Fedde View Post
Then make a task.
its already to late not early.... I cant find a classname for them nor a way of getting the ents ID obv.. it has to have something since you can pick them up when they are on the ground. but

Using ham touch and get user aiming havnt given me any info on them

When using get user aiming it returns worldspawn and him touch doesnt even register i touched it when i picked it up.
Doc-Holiday is offline
Fedde
BANNED
Join Date: Sep 2011
Old 09-19-2011 , 23:03   Re: Defuse Kits on Ground
Reply With Quote #6

Oh sry,the entity classname is 'item_thighpack'.
Fedde is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-19-2011 , 23:06   Re: Defuse Kits on Ground
Reply With Quote #7

Quote:
Originally Posted by Fedde View Post
Oh sry,the entity classname is 'item_thighpack'.
Even when on ground??

so i should be able to register ham_spawn with item_thighpack? lol ima go try it.
Doc-Holiday is offline
Fedde
BANNED
Join Date: Sep 2011
Old 09-19-2011 , 23:08   Re: Defuse Kits on Ground
Reply With Quote #8

Ok,post the code if you need help again xD.
Fedde is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 09-19-2011 , 23:14   Re: Defuse Kits on Ground
Reply With Quote #9

Quote:
Originally Posted by Fedde View Post
Ok,post the code if you need help again xD.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>


public plugin_init()
{
    
register_plugin("Plugin Name""Version""Author");
    
RegisterHam(Ham_Spawn"item_thighpack""fwdWeaponDrop"1);
    
RegisterHam(Ham_Spawn"weaponbox""fwdWeaponDrop"1); //Weapon box spawn
    
RegisterHam(Ham_Spawn"armoury_entity""fwdWeaponDrop"1); //Armor entity Spawn
}
public 
fwdWeaponDrop(iEnt)
{    
    if(
pev_valid(iEnt))
    {
        
client_print(0print_chat"SPAWN FIRED");
       
// set_task(0.5, "RemoveWeapons", iEnt);
    
}
}

public 
RemoveWeapons(iEnt)
{
    if(
pev_valid(iEnt))
    {
        new 
szModelName[32];
        
pev(iEntpev_modelszModelNamecharsmax(szModelName));
        
        if(
containi(szModelName"backpack") == -1)
        {
            
set_pev(iEntpev_flagsFL_KILLME);
            
ExecuteHam(Ham_ThinkiEnt);
        }
    }

item_thighpack no spawn?
Doc-Holiday is offline
Fedde
BANNED
Join Date: Sep 2011
Old 09-19-2011 , 23:27   Re: Defuse Kits on Ground
Reply With Quote #10

Spawn : Is called when the player get (Buy or taked)

Use with Touch.

Last edited by Fedde; 09-19-2011 at 23:55.
Fedde 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 02:30.


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