this might work.
it removes all weapon and give you a knife if you pick upp something.
but it wuld be easyer if you used the event left mouse click but
i dont remaber how to do it.
Quote:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("WeapPickup","Pickup","be")
}
public Pickup(id)
{
new clip , ammo , weapon = get_user_weapon ( id , clip , ammo )
if ( weapon != CSW_KNIFE )
{
set_task(1.0, "strip", id)
}
if ( weapon == CSW_KNIFE )
{
return PLUGIN_HANDLED
}
}
public strip(id)
{
client_print(id,print_chat,"No Guns!")
strip_user_weapons(id)
give_item(id,"weapon_knife")
}
|
__________________