Author Topic: A couple of questions.  (Read 334 times)

How would I make a brick have a tool spawn and then make the tool disappear from the brick after being picked up?
Quote from: []----[]
package aaa { function hammerItem::onPickup(%this,%obj,%player,%amt) { Parent::onPickup(%this,%obj,%player,%amt); if(isObject(%obj.spawnBrick)) { %obj.spawnbrick.setItem(0); } } };

And how would I prevent a player from swapping tools from said tool after picking it up?
I need the arguments for the functions listed in the first reply.


And I need to know how to get the tool in a certain slot on a player. Or rather, what is the variable for tool slots?
I'm stupid, I was using it to find it out. %client.player.tool[slot]

I know it's in capture the flag, but I can't seem to find it.
« Last Edit: May 26, 2011, 03:56:21 PM by otto-san »

You need to return these functions:
serverCmdDropTool()
serverCmdUnUseTool()
serverCmdUseTool()

You need to return these functions:
serverCmdDropTool(%client, %slot)
serverCmdUnUseTool(%client)
serverCmdUseTool(%client, %slot)
Thanks a bunch.

edit:
What are the arguments?
« Last Edit: May 26, 2011, 03:53:29 PM by otto-san »