I want it so that if a player makes a brick, and sets it as an item spawn, then leaves the game. So that all players in the minigame can still pick up that item.
First I tried:
package Pickup
{
function minigamecstar fishe(%a,%b,%c)
{
return 1;
}
};
activatepackage(Pickup);
That didn't seem to do anything.
Next I tried:
package Pickup
{
function armor::onCollision(%this,%obj,%col,%thing,%other)
{
if(isObject(%obj.client))
{
if(isObject(%col))
{
if(%col.getClassName() $= "Item")
{
%slotsfree = 0;
for(%i=0; %i<5; %i++)
if(%obj.tool[%i] > 1)
%slotsfree++;
if(%slotsfree < 5)
{
%slot = 0;
for(%iq=0; %iq<5; %iq++)
{
if(!isObject(%obj.tool[%iq]))
{
%slot = %iq;
break;
}
}
%obj.tool[%slot] = %col.dataBlock.getID();
messageclient(%obj.client,'MsgItemPickup','',%slot,%col.dataBlock.getID());
%col.delete();
}
}
}
}
if(isObject(%col))
parent::oncollision(%this,%obj,%col,%thing,%other);
}
};
activatepackage(Pickup);
Players could pick up the items, but the bricks item spawn would be set to none, meaning the items would never respawn.
How can I make the player pickup the item, as to have it respawn normally?