Thread: Knife Drop
View Single Post
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 09-17-2009 , 21:19   Re: Knife Drop
Reply With Quote #14

Why not using Engine?

PHP Code:
stock ham_strip_weapon(idweapon[])
{
    if(!
equal(weapon,"weapon_",7)) 
        return 
0
    
    
new wId get_weaponid(weapon)
    
    if(!
wId) return 0
    
    
new wEnt
    
    
while((wEnt find_ent_by_class(wEntweapon)) && entity_get_edict(wEntEV_ENT_owner) != id) {}
    
    if(!
wEnt) return 0
    
    
if(get_user_weapon(id) == wId
        
ExecuteHamB(Ham_Weapon_RetireWeapon,wEnt);
    
    if(!
ExecuteHamB(Ham_RemovePlayerItem,id,wEnt)) 
        return 
0
        
    ExecuteHamB
(Ham_Item_KillwEnt)
    
    
entity_set_int(idEV_INT_weaponsentity_get_int(idEV_INT_weapons) & ~(1<<wId))

    return 
1

__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline