public pfn_touch(ptr, ptd) { if ((ptr>=1 && ptr<=32) && is_user_connected(ptr)) { /* Do stuff here, ptr is weapon handle */ } return PLUGIN_CONTINUE }