Raised This Month: $ Target: $400
 0% 

Strip weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Old 05-19-2009, 05:59
vato loco [GE-S]
This message has been deleted by vato loco [GE-S]. Reason: ...
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 05-19-2009 , 08:49   Re: Strip weapon
Reply With Quote #2

here add this to your code
prevent weapon pick up if is player g_Hasspartan[id]
and if player buy weapons after strip weapon will be switch automatic to knife
PHP Code:
public plugin_init()
{
    
register_forward(FM_Touch"WeaponTouch")
    
register_event("CurWeapon""ev_CheckWeapon""be""1=1")

PHP Code:
public WeaponTouch(entid)
{
    if (
is_user_alive(id) && g_Hasspartan[id])
    {
        new 
ClassName[32]
        
pev(entpev_classnameClassName31)
        
        if (
equal(ClassName"weaponbox") || equal(ClassName"armoury_entity") || equal(ClassName"grenade"))
            return 
FMRES_SUPERCEDE
    
}
    return 
FMRES_IGNORED


public 
ev_CheckWeapon(id
{
    static 
weapon_num
    weapon_num 
read_data(2)         
    
    if(
is_user_alive(id) && g_Hasspartan[id]) 
    {
        if(
weapon_num != CSW_KNIFE
        {
            
engclient_cmd(id"weapon_knife")
        }
    }

__________________

Last edited by vato loco [GE-S]; 05-19-2009 at 12:56.
vato loco [GE-S] is offline
maoxianxie
Member
Join Date: Aug 2011
Old 09-09-2011 , 23:52   Re: Strip weapon
Reply With Quote #3

How to use fm_weaponstirp
maoxianxie 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 00:30.


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