I've decided to remake my Headcrab mod for v10, but i need help, i want to make it so if someone already typed /headcrab, and re-types it, it'll say "NAME" is no longer a headcrab zombie.", here's the script
datablock ShapeBaseImageData(HeadcrabImage)
{
shapeFile = "Add-Ons/Script_Headcrab/Headcrab.dts";
emap = true;
mountPoint = $HeadSlot;
offset = "0 0 0.1";
eyeOffset = "0 0 0.1";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "1.000 1.000 1.000 1.000";
};
function serverCmdHeadcrab(%client)
{
bottomPrintAll(%client.name SPC "has become a headcrab zombie!",3,1);
//other stuff
%player = %client.player;
if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(HeadcrabImage))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
}
else
{
%player.unmountImage(2);
%player.mountImage(HeadcrabImage,2);
bottomPrintAll(%client.name SPC "is no longer a headcrab zombie.",3,1);
for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
%player.hideNode($accent[%i]);
%player.hideNode(headskin);
}
}
}
}
I'll fix the offset myself since i at least know how to do that right
Edit: I've made it so that "NAME is no longer a headcrab zombie." message appear, but it happens when i first put on the headcrab