Author Topic: Custom script not working?  (Read 1014 times)

I made a little fun script for my server but it seems to be having a problem
When you type /wearadminhat
it is supposed to mount an admin hat to your player but it wont show up even though I typed the command.
Same for the second command
Here is the script:
Code: [Select]
datablock ShapeBaseImageData(AdminHatImage)
{
shapeFile = "./AdminHat.dts";
emap = false;
doColorShift = false;
colorshiftcolor = "0 0 0 1";
mountPoint = $HeadSlot;
offset = "0 0 0.4";
eyeOffset = "-1 -1 -1";
rotation = "0 0 0 0";
className = "ItemImage";
};

datablock ShapeBaseImageData(SuperAdminHatImage)
{
shapeFile = "./SuperAdminHat.dts";
emap = false;
doColorShift = false;
colorshiftcolor = "0 0 0 1";
mountPoint = $HeadSlot;
offset = "0 0 0.4";
eyeOffset = "-1 -1 -1";
rotation = "0 0 0 0";
className = "ItemImage";
};

function serverCmdwearadminhat(%client)
{
if(%client.isAdmin||%client.isSuperAdmin)
{
%client.Player.mountImage(AdminHatImage,$headSlot);
}
else
{
messageClient(%client,"","You are not an Admin!");
}
}

function serverCmdwearSAhat(%client)
{
if(%client.isSuperAdmin)
{
%client.Player.mountImage(SuperAdminHatImage,$headSlot);
}
else
{
messageClient(%client,"","You are not a Super Admin!");
}
}

Do your hats have mountPoints?


Yes
Sorry if you took this wrong but I'm Darksaber's alt that I use at school so yes the hats do have mountpoints.
It IS possible that I misspelled the name, I'll have to check after school.

Keep in mind the mount point name is cap sensitive.

Try adjusting the offset on the Z axis.