I recently started hosting LAN so that my brother and I could play together. We were having fun and going about when it came to a building script, with us requiring resources. The problem was I had the resources and he didn't, so when I tried building it tried using his resources rather than mine. I think this is due to the fact that while playing LAN, Blockland thinks we are using the same key since we have the same BLID, LAN. So since he was the last to join, the function attempts to use him as the player who is trying to build, when I am trying to build and he isn't. I whipped up this code in attempt for a fix but to no avail:
if(%client.bl_ID == 999999)
{
for (%i = 0; %i < ClientGroup.getCount(); %i++)
{
if(ClientGroup.getObject(%i).RPData.value["login"] $= "Gordo12699")
{
%playercheck++;
}
if(%playercheck >= 1)
{
if (%brick.client.RPData.value["login"] $= "Gordo12699")
{
%client = findclientbyname("Gordo12699");
warn("Add-Ons/RP_Money/bricks.cs (39): Client Login Name Gordo12699 found. Setting %client to whoevers login name is Gordo12699...");
}
else
{
warn("Add-Ons/RP_Money/bricks.cs (43): No Login Name found. Will not change %client value.");
}
}
}
}
If anyone can find a fix for when I try to build it uses his resources but when he tried to build it doesn't use my resources problem, that would be greatly appreciated.
Edit: When i try planting a brick it echos: No Login Name found. Will not change %client value. Even when I am logged in.