Blockland Forums > Modification Help
Datablock Change Not Working
Pages: (1/1)
jes00:
I tried the following code and the %client.changedatablock(SHorseArmor); won't work but there is no syntax error : /
--- Code: ---function serverCmdMorph(%client,%word,%wordTwo)
{
if(%word $= "horse")
{
messageClient(%client, '', "<color:ffffff>You morph into a <color:FFFF00>Horse<color:ffffff>.");
%client.changedatablock(SHorseArmor);
}
}
--- End code ---
EDIT: Tried %client.changedatablock("SHorseArmor"); and it still does not work.
Amade:
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.
jes00:
--- Quote from: Amade on October 27, 2011, 04:04:29 PM ---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.
--- End quote ---
Still does not work ):
--- Code: ---%client.playerSetdatablock("HorseArmor");
--- End code ---
Nexus:
--- Quote from: jes00 on October 27, 2011, 04:09:42 PM ---Still does not work ):
--- Code: ---%client.playerSetdatablock("HorseArmor");
--- End code ---
--- End quote ---
--- Code: ---%client.player.setdatablock("apersonwithscriptingknowledge");
--- End code ---
jes00:
--- Quote from: Nexus on October 27, 2011, 04:11:00 PM ---
--- Code: ---%client.player.setdatablock("apersonwithscriptingknowledge");
--- End code ---
--- End quote ---
Thanks!
Pages: (1/1)