I'm trying to create a inventory system, If you know of a more efficient way of doing this do tell me, But I cannot figure out what is wrong with this, I believe its the "commandToClient" and most likely my friend didn't explain how to use it correctly, And the ServerCmd in the server.cs is just a testing function that I will change into actually adding items once I sort this all out, But I don't need help with that
function serverCmdChangeLoadHead(%client)
{
%client.PWAR_T60_Head = 0;
%client.PWAR_T51_Head = 0;
%client.PWAR_X01_Head = 1;
commandToClient('PipPowerArmor', %client.PWAR_T60_Head, %client.PWAR_T51_Head, %client.PWAR_X01_Head);
}
function FORPG_PowerArmorHead_List::onWake(%client)
{
if(%client.PWAR_X01_Head==1)
{
FORPG_PowerArmorHead_List.addRow(0, "X-01 Head");
}
FORPG_PowerArmorHead_List.addRow(1, "T-45 Head");
FORPG_PowerArmorHead_List.addRow(2, "T-60 Head");
}
Also I changed it to == as a test to see if I could get it to even detect if there was 1, But it cant, The If statement isnt the problem here because it works when its set to 0