shrike Posted April 1, 2012 Share Posted April 1, 2012 (edited) waterFunc WaterFunc is a simple script to control the water level in MTASA. It's available on the community Resources page. The script is configured to be restricted to the admin group. You can change this if you wish, but several people trying to run the functions at the same time won't work. Make the following changes to acl.xml (server cannot be runnning) Add the following line to the admin group: Add the following line to the admin access control list: When the script is running, press the F6 key to access the gui menu. You can then: Set the water level (plus or minus) for the whole map. Surge (raise) the water level by n. Ebb (lower) the water level by n. Set a tide cycle. The water level is cycled up and down by the value specified. Setting the value to 0 will stop the tide function when the water level returns to the starting point of the cycle. Set a wave height value. I find the water movement looks more realistic with this turned on. 5 different water speeds. The "x5" speed makes the water movement a bit twitchy. Echo to Screen creates a small window under the radar displaying the water level. You can then close the main gui window while a function is running. Reset water level. Kills the current water level function and restores all vars to default settings. Using the Flood, Surge, Ebb and Tide functions, a water element is created automatically for water levels greater than 0 and destroyed for water levels less than 0. I'll be the first to acknowledge that the script is not well written and could be improved. Everything seem to work well enough, but if there's a problem the reset button should correct any water function problems. If not, re-start the script. Feel free to use this code as you wish. I studied many other scripts while learning to code in LUA, and have borrowed coding styles and naming conventions. (thanks, Remp, for the tidy coding style in your snow script and for one of the best GUI's I've seen) This has only been tested on a small server with a couple of players. I have no idea how well it will work in a many player, multi script environment. I'm open to suggestions and problem reports but I can't promise the script will be maintained/updated regularly. I may add other features to the script at a later date. Edited April 11, 2012 by Guest Link to comment
qaisjp Posted April 1, 2012 Share Posted April 1, 2012 Looks nice, but 50% of people are lazy to find the resource, that includes me, please include a link in the above post. Link to comment
DNL291 Posted April 1, 2012 Share Posted April 1, 2012 Looks nice, but 50% of people are lazy to find the resource, that includes me, please include a link in the above post. https://community.multitheftauto.com/index.php?p= ... ls&id=4236 Link to comment
shrike Posted April 6, 2012 Author Share Posted April 6, 2012 Thanks, Noddy for the positive comment and to DNL291 for adding the link to the resource. I meant to do that when I uploaded the script but forgot. I hope some people will provide feedback on how it runs, especially on a server with multiple players. I have no way to test the script under load and I'm curious as to the impact on a busy server since the functions all run server-side. Link to comment
shrike Posted April 8, 2012 Author Share Posted April 8, 2012 Version 1.1 uploaded The GUI layout has been re-ordered. Link to comment
shrike Posted April 11, 2012 Author Share Posted April 11, 2012 Noddy, I'll see if I can create and upload some shots. As this is the first script I've uploaded, I'm working out the process as I go. eAi, I don't know that it has to be admin only. It runs server side and I imagined it would be used as part of a flooded world scenario and would be run by the admin(s) only as part of the environment. I suppose if it were re-written to run client side instead individual users could run it as they wish. It's only been tested on a private server with 1 or 2 users. I might make changes/additions based on enough feedback from people using it, or others might modify the script to suit their own purpose. Link to comment
qaisjp Posted April 13, 2012 Share Posted April 13, 2012 Perhaps another edition of waterFunc that allows only the client to edit their side, but the original (this one) to have admins flood the entire server. I feel that is unnecessary and it's fine as it is now. Link to comment
shrike Posted April 15, 2012 Author Share Posted April 15, 2012 I think it works well as is. The script has been downloaded by a number of people and as the only feedback has been from Noddy so far, I guess they like it the way it is too. Or they're too lazy to comment or complain. I've posted a few screenshots on the resource page: https://community.multitheftauto.com/index.php?p= ... ls&id=4236 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now