Author Topic: commandtoserver Script  (Read 1368 times)


How I put On GUI button for script?

Code: [Select]
ModelHat.cs
datablock ShapeBaseImageData(ModelHatImage)
{
shapeFile = "./Model.dts";
emap = true;
mountPoint = $HeadSlot;
offset = "0 0 0.1";
eyeOffset = "0 0 10";
rotation = eulerToMatrix("0 0 0");
scale = "1 1 1";
doColorShift = false;
colorShiftColor = "1.000 1.000 1.000 1.000";
};

Server.cs
function serverCmdSentModelhat(%client)
{
%player = %client.player;

if(isObject(%player))
{
if(%player.getMountedImage(2) $= nametoID(ModeHatlImage))
{
%player.unmountImage(2);
%client.applyBodyParts();
%client.applyBodyColors();
}
else
{
%player.unmountImage(2);
%player.mountImage(ModelHatImage,2);

for(%i = 0;$hat[%i] !$= "";%i++)
{
%player.hideNode($hat[%i]);
%player.hideNode($accent[%i]);
}
}
}
}

I know about function serverCmdModel put in chat box /model to function. I not want use severCMD instead use Button with gui. something like this ?
Code: [Select]
commandtoserver(\'ModelHat\');

function serverCmdSentModelhat(%client)

commandtoserver('ModelHat');

Should be commandToServer('SentModelHat');

Should be commandToServer('SentModelHat');
add (%client)?

add (%client)?

No, when i get back home ill show you have to send data from the client to the server and from the server to the client if nobodies helped you.

Okay. When you get on RTB, talk to me. I tired make appear. it does not. I will give you my add-on link, not here.