| Blockland Forums > Modification Help |
| client-side activation/deactivation |
| (1/3) > >> |
| tylerk196:
I'm working on a client-side mod, but because of what it dose I need a way to activate/deactivate it. How would i do that? |
| Iban:
Put everything inside a package, even unique functions. The only thing outside the package should be the on/off switch. deactivatePackage(packageName); |
| Greek2me:
Did you want to open and close a GUI window or to disable the whole script? If you're disabling the whole thing, look at what Iban said. You can open the GUI with canvas.pushDialog(GuiNameOrID); and you can close it with canvas.popDialog(GuiNameOrID);. |
| tylerk196:
OK its all in a package how would i make a chat command like /on or /off? |
| Daenth:
--- Code: ---function clientCmdpackageon() { activatePackage(example) }; function clientCmdpackageoff() { deactivatePackage(example) }; package (example) --- End code --- I think. Replace packageon and packageoff with the command you want and replace example with your package name. |
| Navigation |
| Message Index |
| Next page |