Raised This Month: $ Target: $400
 0% 

Get weaponbox name?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-23-2015 , 15:38   Get weaponbox name?
Reply With Quote #1

PHP Code:
RegisterHam(Ham_Spawn"weaponbox""weapon_ground"1)

public 
weapon_ground(iEnt)
{
    new 
szName[32]
    
entity_get_string(iEntEV_SZ_classnameszNamecharsmax(szName))
    
    if(
equal(szName"grenade"))
        return 
HAM_IGNORED
        
    set_pev
(iEntpev_flagsFL_KILLME)
    
dllfunc(DLLFunc_ThinkiEnt)
    return 
HAM_IGNORED

I'm using this to disallow weapon dropping, i.e. having weapons on the ground, but I wan't to allow only the C4 to be able to "spawn". I tried getting classname and modelname and check if it's equal to "grenade" or "weapon_c4", but it doesn't work.

Last edited by OciXCrom; 11-04-2015 at 06:25.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
 


Thread Tools
Display Modes

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:17.


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