I think I know what you're trying to do.
If you have a weapon called "myWeapon", you can just call it like this:
PHP Code:
//#CLIENTSIDE
function onCreated() {
myWeapon.testFunc();
}
if the weapon name has any weird characters/spaces, etc in it, you can do
PHP Code:
(@ "-System/My Weapon").testFunc();
for example.