micheal1230 Posted May 20, 2012 Posted May 20, 2012 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)
Stanley Sathler Posted May 20, 2012 Posted May 20, 2012 You're using createWater() to set the water level on map? If not, then setWaterLevel() will not be useful for you. *This affirmative needs revision - Anyway, check the positions. Maybe there's a incorrect number.
Wei Posted May 20, 2012 Posted May 20, 2012 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)
Stanley Sathler Posted May 20, 2012 Posted May 20, 2012 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 ) --[[ ..... ]]
arezu Posted May 20, 2012 Posted May 20, 2012 Try using it server sided instead. It works much better than client sided.
Wei Posted May 20, 2012 Posted May 20, 2012 If I'm right, your example is incorrect, Blazy I've copyed it from wiki
Stanley Sathler Posted May 20, 2012 Posted May 20, 2012 Wiki is created by humans, and humans usually make mistakes. Maybe I'm not right, but never think that Wiki will always be correct.
Wei Posted May 20, 2012 Posted May 20, 2012 Wiki is created by humans, and humans usually make mistakes. Maybe I'm not right, but never think that Wiki will always be correct. ok
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