Jump to content

Water Level Script


benjgvps

Recommended Posts

I have seen some servers have the ability to change the water level throughout the server. I thought it would be neat to have on my home LAN server, though I have not found a premade script to let me do this, is there one? If there isn't a mod, developers/scripters take notice: I could see a mod like this becoming pretty popular and if wanted, I can probably throw $5-10 dollars in their direction. If you're interested, E-Mail me...

Link to comment

You can make one yourself. Don't waste money for someone to write for you ~5 lines of code that would take him couple of minutes to make.

Water functions:

https://wiki.multitheftauto.com/wiki/Ser ... _functions

Take this as an example:

addCommandHandler( "waterlevel",
function ( plr, cmd, newlevel )
setWaterLevel( tonumber( newlevel ) );
end
);

Someone has already made similar resource...

https://community.multitheftauto.com/index.html?p ... ils&id=351

I haven't tested it and don't know how it works but you can check this out.

Link to comment
You can make one yourself. Don't waste money for someone to write for you ~5 lines of code that would take him couple of minutes to make.

Water functions:

https://wiki.multitheftauto.com/wiki/Ser ... _functions

Take this as an example:

addCommandHandler( "waterlevel",
function ( plr, cmd, newlevel )
setWaterLevel( tonumber( newlevel ) );
end
);

Someone has already made similar resource...

https://community.multitheftauto.com/index.html?p ... ils&id=351

I haven't tested it and don't know how it works but you can check this out.

I have tested that gamemode and tried to start it on my server, though I just get a black screen.

As for the coding, I would have no idea how I would even start. The only coding I've ever done was some basic stuff on my Arduino, let alone full lua programming for a game. All I really want is to set the water level from a chat command, then I will probably never use the time I spent on learning lua again.

Link to comment

You've got black screen because there is no resource running. You have to start "play" resource. You need to get into scripting or at least read how to administrate your server.

Also, I just gave you the command "waterlevel" -.-'

https://wiki.multitheftauto.com/wiki/Resources check what is a "resource" and have a look at "Getting started" section there https://wiki.multitheftauto.com/wiki/Main_Page

Link to comment

Thanks for all your help, I successfully started the water gamemode shortly after starting the play gamemode. I then typed in the console "water tonumber x" X being the number, surprisingly it worked!

EDIT: I knew it was too easy, There are random pieces of water scattered around, seperated. I guess I will have to figure out how to create one massive piece of water for the entire level and have the pre-existing script to drain the water.

Link to comment
Thanks for all your help, I successfully started the water gamemode shortly after starting the play gamemode. I then typed in the console "water tonumber x" X being the number, surprisingly it worked!

EDIT: I knew it was too easy, There are random pieces of water scattered around, seperated. I guess I will have to figure out how to create one massive piece of water for the entire level and have the pre-existing script to drain the water.

See https://wiki.multitheftauto.com/wiki/CreateWater example, its probably what you want

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...