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 = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString , "player_weaponstrip" ) )
SetKeyValue(iEnt, "origin", "9999 9999 9999", "player_weaponstrip")
SetKeyValue(iEnt, "targetname", "stripper", "player_weaponstrip")
dllfunc(DLLFunc_Spawn, iEnt)
iEnt = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString , "game_player_equip" ) )
SetKeyValue(iEnt, "weapon_knife", "1", "game_player_equip")
SetKeyValue(iEnt, "targetname", "equipment", "game_player_equip")
dllfunc(DLLFunc_Spawn, iEnt)
iEnt = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_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_Spawn, iEnt)
iEnt = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString , "info_map_parameters" ) )
SetKeyValue(iEnt, "buying", "3", "info_map_parameters")
dllfunc(DLLFunc_Spawn, iEnt)
g_iFhKeyValue = register_forward(FM_KeyValue, "KeyValue")
}
SetKeyValue(iEnt, const szKey[], const szValue[], const szClassName[])
{
set_kvd(0, KV_ClassName, szClassName)
set_kvd(0, KV_KeyName, szKey)
set_kvd(0, KV_Value, szValue)
set_kvd(0, KV_fHandled, 0)
dllfunc(DLLFunc_KeyValue, iEnt, 0)
}
public KeyValue(iEnt, kvd_handle)
{
if( pev_valid(iEnt) )
{
static szClassName[20]
get_kvd(kvd_handle, KV_ClassName, szClassName, charsmax(szClassName))
if( equal(szClassName, "game_player_equip")
|| equal(szClassName, "info_map_parameters")
|| equal(szClassName, "player_weaponstrip") )
{
engfunc( EngFunc_RemoveEntity, iEnt )
return FMRES_SUPERCEDE
}
}
return FMRES_IGNORED
}
public plugin_init()
{
unregister_forward(FM_KeyValue, g_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