Well my friend gave me something that updates the data blocks at my server, but it only worked for him! He got slanted bricks when I ran the function but I did not, this probably means hosts don't get it, but players do:
function updateclientdatablocks()
{
for (%i = 0; %i < ClientGroup.getCount(); %i++)
{
%client = ClientGroup.getObject(%i);
%client.reloadDatablocks = true;
%client.transmitDataBlocks($missionSequence);
}
}
IN ADDITION TO:
function ServerCmdEnableAddon(%Client,%Addon)
{
//Return; means to exit so were exiting the command
//"GetNumKeyID" means the host ID so we are comparing it to the clients id
if(%Client.bl_id != getNumKeyID())
return;
//This checks if the Server.cs exists
if(!isFile("add-ons/"@%Addon@"/server.cs"))
return;
//This enables the Server.cs
announce("\c0Host is enabling\c3" SPC %Addon);
exec("add-ons/"@%Addon@"/server.cs");
//This announces it
if(!copmile("add-ons/Script_EnableAddon/server.cs"))
{
warn("Contains syntax errors!");
}
announce("\c0Updating datablocks for" SPC %Addon);
exec("add-ons/Script_updateClientDatablocks/server.cs");
}
Any help please?