SWEP and Player code hookup or something similar

Hello FP, I want to create a SWEP which makes on weapon owner “drunk” or “stunned” effect(player view is moving and rotating in some directions) but I have some problems… I need to make variable which is controling that effect and some functions(CalcView or SetEyeAngles) in player code because when I will change to other weapon this effect just stops. I don’t know is there possibility to make it without browsing player files. Can I my own functions hook up to player code(think functions) to SWEP code or maybe there’s other way to do this?

I hope you will understand what I want to do. Sorry for my bad english.

you use the netlib, and create a client file in lua/autorun/client for your addon, and recieve it there.

Netlib? Can you provide me more informations about this?