Raised This Month: $ Target: $400
 0% 

Drop then remove C4


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 01-03-2007 , 08:48   Drop then remove C4
Reply With Quote #1

I'm not very good with entities but is this the correct way for dropping the C4 then removing it?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

public plugin_init() {
    
register_event("StatusIcon""c4_dropped""be""1=1""1=2""2=c4")
}

public 
c4_dropped(id) {
    
engclient_cmd(id"drop""weapon_c4")
    
set_task(0.1"delete_c4")
}
public 
delete_c4() {
    new 
ent find_ent_by_class(-1"weaponbox")
    while (
ent 0) {
        new 
model[33]
        
entity_get_string(entEV_SZ_modelmodel32)
        if (
equali(model"models/w_backpack.mdl")) {
            
remove_entity(ent)
            return 
PLUGIN_CONTINUE
        
}
        
ent find_ent_by_class(ent"weaponbox")
    }
    return 
PLUGIN_CONTINUE

Also, is there a way to remove hostages as well?
__________________
It's a mystery.
Mini_Midget is offline
 



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 22:19.


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