| Blockland Forums > Modification Help |
| Brick laying |
| << < (2/2) |
| Space Guy:
Sorry, it was fxDTSBrickData:plant/onPlant. I think ::plant returns a number whether it had an error, what error it was or not. Try adding package overrides/echos/etc. |
| MrPickle:
Are they functions? As in function fxDTSBrickData:onPlant? |
| Space Guy:
Yes. Put them in a package to check stuff. --- Code: ---package noPlant { function fxDTSbrickdata::onPlant(%data,%brick) { Parent::onPlant(%data,%brick); schedule(100,0,brickCheck,%brick); } function brickCheck(%brick) { if(!%brick.getGroup().client.isSuperAdmin && $Pref::Server::BricksOff) { commandtoclient(%brick.getGroup().client,'centerprint',"You must be an admin to place bricks."); %brick.killbrick(); } } function servercmdBricks(%client) { if(%client.isSuperAdmin) { $Pref::Server::BricksOff = !$Pref::Server::BricksOff; messageall('',"\c2Non-admin building is now \c3" @ ($Pref::Server::BricksOff ? "OFF" : "ON")); } } }; activatePackage(noPlant); --- End code --- Checks whether the client is a Super admin; deletes brick if it isn't. |
| Navigation |
| Message Index |
| Previous page |