I'll try and help, but some of these things I'm not sure what you're even trying to do.
Assuming this part isn't the end of a function declaration or something:
{
$protec::using = 0
} Delete that part, or if you're trying to just define a global variable, delete the brackets
function %client::onFire(%this,%obj,%client)
{
%client = %obj.client;
%player = %obj;
if $protec::using == 0
{
%obj.unhideNode ("Armor");
$protec::using set = 1
}
else
{
%obj.hidenode ("Armor");
$protec::using set = 1
}
}
}
function $protec::using if == 1(%this,%obj,%client)
{
%client = %obj.client;
%player = %obj;
if(%obj.getDamageLevel() <= 100)
{
%obj.addHealth = (%obj.getDamageLevel())
}
}
First function:
In the function name: %client
If you're trying to make a client method, that should be GameConnection.
But onFire is a weaponImage (I believe) method, so that should be protecImage, and I believe the argments are this obj and slot, so the first line should be:
function protecImage::onFire(%this,%obj,%slot)
There's nothing wrong with %player = %obj; but since you're not using %player, defining it is pointless
For the if and else blocks, there's too many things for me to type step by step instructions:
if(%obj.isUsingProtec)
{
%obj.hideNode("Armor");
%obj.isUsingProtec = 0;
}
else
{
%obj.unhidenode("Armor");
%obj.isUsingProtec = 1;
}
I have no idea at all what you're trying to do with the second function.