Raised This Month: $ Target: $400
 0% 

Strip weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 05-18-2009 , 02:42   Re: Strip weapon
Reply With Quote #1

Quote:
Originally Posted by xbatista View Post
strip_user_weapons (fun module) is more efficent than (fakemeta) this :
PHP Code:
stock fm_strip_user_weapons(index
{
    static 
entent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"player_weaponstrip"))
    if(!
pev_valid(ent)) return 0
 
    dllfunc
(DLLFunc_Spawnent)
    
dllfunc(DLLFunc_Useentindex)
    
engfunc(EngFunc_RemoveEntityent)
 
    return 
1

Second question missunderstood

Thanks but still need to include Fun but anyway you know how to add question 2 ?
__________________
ƒa†es™ is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 05-18-2009 , 02:54   Re: Strip weapon
Reply With Quote #2

u wanna ham? ham is much much better.

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new g_iFhKeyValue

public plugin_precache()
{
    new 
iEnt

    iEnt 
engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "player_weaponstrip" ) )
    
SetKeyValue(iEnt"origin""9999 9999 9999""player_weaponstrip")
    
SetKeyValue(iEnt"targetname""stripper""player_weaponstrip")
    
dllfunc(DLLFunc_SpawniEnt)

    
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "game_player_equip" ) )
    
SetKeyValue(iEnt"weapon_knife""1""game_player_equip")
    
SetKeyValue(iEnt"targetname""equipment""game_player_equip")
    
dllfunc(DLLFunc_SpawniEnt)

    
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "multi_manager" ) )
    
SetKeyValue(iEnt"stripper""0""multi_manager")
    
SetKeyValue(iEnt"equipment""1""multi_manager")
    
SetKeyValue(iEnt"targetname""game_playerspawn""multi_manager")
    
SetKeyValue(iEnt"spawnflags""1""multi_manager")
    
dllfunc(DLLFunc_SpawniEnt)

    
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "info_map_parameters" ) )
    
SetKeyValue(iEnt"buying""3""info_map_parameters")
    
dllfunc(DLLFunc_SpawniEnt)

    
g_iFhKeyValue register_forward(FM_KeyValue"KeyValue")
}

SetKeyValue(iEnt, const szKey[], const szValue[], const szClassName[])
{
    
set_kvd(0KV_ClassNameszClassName)
    
set_kvd(0KV_KeyNameszKey)
    
set_kvd(0KV_ValueszValue)
    
set_kvd(0KV_fHandled0)
    
dllfunc(DLLFunc_KeyValueiEnt0)
}

public 
KeyValue(iEntkvd_handle)
{
    if( 
pev_valid(iEnt) )
    {
        static 
szClassName[20]
        
get_kvd(kvd_handleKV_ClassNameszClassNamecharsmax(szClassName))
        if(    
equal(szClassName"game_player_equip")
        ||    
equal(szClassName"info_map_parameters")
        ||    
equal(szClassName"player_weaponstrip")    )
        {
            
engfuncEngFunc_RemoveEntityiEnt )
            return 
FMRES_SUPERCEDE
        
}
    }
    return 
FMRES_IGNORED
}

public 
plugin_init()
{
    
unregister_forward(FM_KeyValueg_iFhKeyValue)
    
set_cvar_float("sv_restart"1.0)

    
register_plugin("strips""1""AUTHOR")

    
pause("ad")

for 2. u can remove weapons on ground after x sec.

by this code, player willbe stripped & drops nothing. so player cant buy, cant peak anyweapons. but maybe the weapons on map like aim_ak-colt
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 05-18-2009 , 05:21   Re: Strip weapon
Reply With Quote #3

Quote:
Originally Posted by One View Post
u wanna ham? ham is much much better.

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
 
new g_iFhKeyValue
 
public plugin_precache()
{
    new 
iEnt
 
    iEnt 
engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "player_weaponstrip" ) )
    
SetKeyValue(iEnt"origin""9999 9999 9999""player_weaponstrip")
    
SetKeyValue(iEnt"targetname""stripper""player_weaponstrip")
    
dllfunc(DLLFunc_SpawniEnt)
 
    
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "game_player_equip" ) )
    
SetKeyValue(iEnt"weapon_knife""1""game_player_equip")
    
SetKeyValue(iEnt"targetname""equipment""game_player_equip")
    
dllfunc(DLLFunc_SpawniEnt)
 
    
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "multi_manager" ) )
    
SetKeyValue(iEnt"stripper""0""multi_manager")
    
SetKeyValue(iEnt"equipment""1""multi_manager")
    
SetKeyValue(iEnt"targetname""game_playerspawn""multi_manager")
    
SetKeyValue(iEnt"spawnflags""1""multi_manager")
    
dllfunc(DLLFunc_SpawniEnt)
 
    
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString "info_map_parameters" ) )
    
SetKeyValue(iEnt"buying""3""info_map_parameters")
    
dllfunc(DLLFunc_SpawniEnt)
 
    
g_iFhKeyValue register_forward(FM_KeyValue"KeyValue")
}
 
SetKeyValue(iEnt, const szKey[], const szValue[], const szClassName[])
{
    
set_kvd(0KV_ClassNameszClassName)
    
set_kvd(0KV_KeyNameszKey)
    
set_kvd(0KV_ValueszValue)
    
set_kvd(0KV_fHandled0)
    
dllfunc(DLLFunc_KeyValueiEnt0)
}
 
public 
KeyValue(iEntkvd_handle)
{
    if( 
pev_valid(iEnt) )
    {
        static 
szClassName[20]
        
get_kvd(kvd_handleKV_ClassNameszClassNamecharsmax(szClassName))
        if(    
equal(szClassName"game_player_equip")
        ||    
equal(szClassName"info_map_parameters")
        ||    
equal(szClassName"player_weaponstrip")    )
        {
            
engfuncEngFunc_RemoveEntityiEnt )
            return 
FMRES_SUPERCEDE
        
}
    }
    return 
FMRES_IGNORED
}
 
public 
plugin_init()
{
    
unregister_forward(FM_KeyValueg_iFhKeyValue)
    
set_cvar_float("sv_restart"1.0)
 
    
register_plugin("strips""1""AUTHOR")
 
    
pause("ad")

for 2. u can remove weapons on ground after x sec.

by this code, player willbe stripped & drops nothing. so player cant buy, cant peak anyweapons. but maybe the weapons on map like aim_ak-colt

I think you have mistaker because i don't want everyone to stirp i just want the person strip when he brought spartan extra item and he cannot take back the weapon or any other weapon too.
__________________

Last edited by ƒa†es™; 05-19-2009 at 01:20.
ƒa†es™ is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 05-18-2009 , 05:35   Re: Strip weapon
Reply With Quote #4

oh oki.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
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 01:35.


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