Author Topic: function SoldierMe  (Read 996 times)

and its armymansoldier not men.
Oh, yeah
I wrote it wrong (not in the script, only here!)

Wrote it wrong, see next post
« Last Edit: July 15, 2009, 08:56:56 AM by chilmans »

Hi guys,
still doesn't work

Maybe it's the server.cs

Here it is:
Code: [Select]
%error=ForceRequiredAddOn("Player_ArmyMenSoldier");

if(%error==$Error::AddOn_Disabled){
 armymansoldierArmor.uiName="";
}

if(%error==$Error::AddOn_NotFound){
 error("ERROR: Player_ArmyMenSoldie - required add-on Player_ArmyMenSoldier not found");
}else{
 exec("./Script_Soldierme.cs");
}

maybe something wrong in here?[/s]

Yeah, I wrote ArmyMenSoldier instead of ArmyManSoldier, maybe that was the problem :P
will try if it works now

The code AGlassOfMilk gave me had the same problem:
Code: [Select]
function serverCmdSoldierMe(%client)
{
if(isObject(%client.player))
{
if(%client.player.getdatablock().getName() $= "ArmyM[b]e[/b]nSoldierArmor")
{
return;
}else{
%Player = %Client.player;
%Player.setDataBlock("ArmyM[b]e[/b]nSoldierArmor");
}
}
}
Fixed it

Now it works

Thanks to everybody (Darkstar, AGlassOfMilk, Chrono, Kalphiter and Ephialtes)
« Last Edit: July 15, 2009, 09:00:43 AM by chilmans »