Jump to content

createWater help


Recommended Posts

Well i get no error but the water dont show the script is client side

function createwater() 
    createWater ( 724.58984375, -1046.759765625, 45.886260986328, 716.1845703125, -1041.908203125, 45.886260986328, 708.4091796875, -1055.3740234375, 45.886260986328, 716.8125, -1060.228515625, 45.886260986328 ) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), createwater) 

Link to comment

Copyed from WIKI !!!

-- Setting water properties. 
height = 40 
SizeVal = 2998 
-- Defining variables. 
southWest_X = -SizeVal 
southWest_Y = -SizeVal 
southEast_X = SizeVal 
southEast_Y = -SizeVal 
northWest_X = -SizeVal 
northWest_Y = SizeVal 
northEast_X = SizeVal 
northEast_Y = SizeVal 
  
-- OnClientResourceStart function that creates the water. 
function thaResourceStarting( ) 
    water = createWater ( southWest_X, southWest_Y, height, southEast_X, southEast_Y, height, northWest_X, northWest_Y, height, northEast_X, northEast_Y, height ) 
    setWaterLevel ( height ) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), thaResourceStarting) 

Link to comment

There's an optional argument in function. Is the "water", where the level will be applied. If not specified, the function will apply the level on default world water, not? If I'm right, your example is incorrect, Blazy. You must use:

--[[ .... ]] 
water = createWater ( southWest_X, southWest_Y, height, southEast_X, southEast_Y, height, northWest_X, northWest_Y, height, northEast_X, northEast_Y, height ) 
setWaterLevel ( water, height ) 
--[[ ..... ]] 

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...