function serverCmdSetRed(%client){
%client.chest = "0";
%client.chestcolor = "1 0 0 1";
%client.ApplyBodyParts();
%client.ApplyBodyColors();
}
It changes the Chest variable so it needs to apply body parts too, changing FemChest to normal Chest.
package drop
{
function servercmdDropTool(%client,%slot)
{
if(!isObject(%client.player.tool[%slot])) return;
if(%client.player.tool[%slot].getName() $= "ItemName")
{
messageall('',"Message");
}
}
};activatePackage(drop);
To code fixers:
- Yes, there is a neater way to use
ItemName::onThrow, but the arguments are in my BL0002 folder and it would take time to get there.
- It would be neater to check whether %client.player exists first, but since undefined variables are "" it won't glitch up if I reference a nonexistant object's variables. It would take extra checking and be 0.001% slower.