1
Help / Re: Scripting Help
« on: July 09, 2019, 07:27:33 AM »
Thank you!
I have finished the addon.
Lots of love!
I have finished the addon.
Lots of love!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
function fxDTSBrick::onAdd(%brick, %client, %obj)
{
%c = getBrickGroupFromObject(%brick).client;
if(isObject(%c) && isObject(%c.player) && isObject(%c.player.tempbrick))
{
if(%c.isAdmin)
{
// Here
return;
}
else if(%c.buildallow == 1)
{
// Here
return;
}
else
{
commandToClient(%c,'centerprint',"\c7Building is not enabled for players.",2);
%brick.schedule(0,"delete");
%c.player.tempbrick.delete();
}
}
}
package BuildingBlocker
{
function gameConnection::OnClientEnterGame(%this,%obj,%a,%b,%c,%d,%e)
{
%this.buildallow = 0;
Parent::OnClientEnterGame(%this,%obj,%a,%b,%c,%d,%e);
}
function fxDTSbrick::Plant(%brick, %client, %obj)
{
%e = Parent::Plant(%brick);
if(!%e)
{
%c = getBrickGroupFromObject(%brick).client;
if(isObject(%c) && isObject(%c.player) && isObject(%c.player.tempbrick))
{
if(%c.isAdmin)
{
Parent::Plant(%brick);
}
else if(%c.buildallow == 1)
{
Parent::Plant(%brick);
}
else
{
commandToClient(%c,'centerprint',"\c7Building is not enabled for players.",2);
%brick.schedule(0,"delete");
%c.player.tempbrick.delete();
}
}
}
}
};
activatePackage("BuildingBlocker");
You sure it's not Event_SaveLoadItems causing you to crash?I disabled all my event addons and still crashing.
have you tried only enabling half your usual addons at a time?Brick add-ons work, nothing else.
one of them is probably the issue
have you tried hosting with only defaults enabled?Default add-ons work, clean install, but as soon as I enable addons, the server crashes.
what about on a clean install?