Alright! Thanks a bill Kirbz. The chat restriction code is fully functioning now.
All that remains is to get the fire code to end.
This is what I have so far:
package fireprevent{
function WeaponImage::onFire(%this,%obj,%slot)
{
if($restriction == 1;) // Off
{
messageClient(%client,"","\c6Your Weapon Fire has been restricted.");
return;
}
else
{
parent::onFire(%this,%obj,%slot);
}
}
};
activatepackage(fireprevent);
and I get an error each time I fire. Do note that the weapon is firing (The Tools move, brick weapons fire, and guns shoot, but there is no effect. E.g, no bullet, no brick, no collision particles.) My 'educated' guess would be that onfire is DURING the fire, and not BEFORE it.
Once again, here's my error:
base/server/scripts/allGameScripts.cs (7809): Unable to find object: '' attempting to call function 'getEyeTransform'
base/server/scripts/allGameScripts.cs (7811): Unable to find object: '' attempting to call function 'getMuzzleVector'
base/server/scripts/allGameScripts.cs (7825): Unable to find object: '' attempting to call function 'getVelocity'
Projectile::Addon: mSourceObjectID is invalid