Author Topic: Datablock Change Not Working  (Read 543 times)

I tried the following code and the %client.changedatablock(SHorseArmor); won't work but there is no syntax error : /
Code: [Select]
function serverCmdMorph(%client,%word,%wordTwo)
{
if(%word $= "horse")
{
messageClient(%client, '', "<color:ffffff>You morph into a <color:FFFF00>Horse<color:ffffff>.");
%client.changedatablock(SHorseArmor);
}
}

EDIT: Tried %client.changedatablock("SHorseArmor"); and it still does not work.
« Last Edit: October 27, 2011, 03:48:26 PM by jes00 »

1. Use %client.player
2. The "setDatablock" function is preferred, changeDatablock is an event but will work the same way.
3. In case you're wanting the default horse and have not created SHorseArmor, the default horse's datablock is called HorseArmor.

1. Use %client.player
2. The "setDatablock" function is preferred, changeDatablock is an event but will work the same way.
3. In case you're wanting the default horse and have not created SHorseArmor, the default horse's datablock is called HorseArmor.
Still does not work ):
Code: [Select]
%client.playerSetdatablock("HorseArmor");

Still does not work ):
Code: [Select]
%client.playerSetdatablock("HorseArmor");

Code: [Select]
%client.player.setdatablock("apersonwithscriptingknowledge");

Code: [Select]
%client.player.setdatablock("apersonwithscriptingknowledge");
Thanks!