Author Topic: Brick Buy Done  (Read 2077 times)

I want to prevent people from buying bricks from the B bricks menu. What function do I not parent?

wouldn't trace(1); tell you this?

I'm not trying to be a douche, I mean that's usually how people find functions, if you didn't already know

You can disable the building guis by using commandToClient(%client,'setBuildingDisabled',1);

What function do I not parent?
Remember that if you make a client-sided mod to "prevent players from doing something" then they will not use or edit your mod to be able to do it even if they gain absolutely nothing.


commandToClient(%client,'setBuildingDisabled',1);

commandToClient(%client,'setBuildingDisabled',1);

You just copied what Greek2me posted

Here's the scenario: I have the brick inventory (at the bottom of the screen) open, with the bricks set to my own selection. When I'm finished with my stuff, it sets the bricks back to whatever the player's inventory was prior. The issue is, if they go to B bricks and hit enter, it replaces my brick inventory selection.

This requires a lot of client compliance to server commands that you really just can't count on.
Like, I am 95% sure that my TMBI mod will just ignore what you are trying to do.
The best option in my opinion is to package building commands as far down the line as possible, and not to trust the client with anything.

You can do this by disabling the servercmdinstantusebrick command, and by packaging the servercmdbuybrick(%slot, %dtb) command.

You can do this by disabling the servercmdinstantusebrick command, and by packaging the servercmdbuybrick(%slot, %dtb) command.
Done. The second part worked for sure, but I don't know about the TMBI compatibility with servercmdinstantusebricks. What are the vars? I used %slot,%dtb.

Done. The second part worked for sure, but I don't know about the TMBI compatibility with servercmdinstantusebricks. What are the vars? I used %slot,%dtb.

/instantusebrick is called when you right click on a brick in the brick selector.  The brick isn't bound to a slot, it is just simply equipped.  The only argument is the datablock of the brick.
TMBI forgoes the entire brick buying process altogether and just uses the instantusebrick command for everything, keeping brick inventory data soley client sided.

keeping brick inventory data soley client sided.
this will mess up hata's crafting thing..
you should add support for what the server makes the client have in their brick inventory :/

it also messed up xalos's castle defense