Giovanni Posted February 17, 2011 Share Posted February 17, 2011 Ye ye I know there are many topics about this but I can't really get this working. I checked the MTA Wiki for help but well that kind of failed. I tried following 2 ways of creating/scripting water for MTA: 1. createWater function thaResourceStarting( ) createWater(4730,-1802.9077148438,224.25262451172,4730,-1790,224.25262451172,4705.8959960938,-1802.9077148438,224.25262451172,4705.8959960938,-1790,224.25262451172) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), thaResourceStarting) That script is placed server side. I wrote the coordinates in the right way I guess, so South-East after..... you know what I mean. Just like it is listed in the Wiki. Well nothing worked. 2. (?) Somewhere I read about those tags. I really don't know how to use them. Also the Wiki didn't help me with this question. I just tried my luck and did this: <water 4730,-1802.9077148438,224.25262451172,4730,-1790,224.25262451172,4705.8959960938,-1802.9077148438,224.25262451172,4705.8959960938,-1790,224.25262451172 /> I placed it in the meta.xml file, after that the map didn't work anymore, what I expected. So if you please could tell me how to use the tag. Thanks. Link to comment
Aibo Posted February 17, 2011 Share Posted February 17, 2011 function thaResourceStarting( ) createWater(4730,-1802.9077148438,224.25262451172,4730,-1790,224.25262451172,4705.8959960938,-1802.9077148438,224.25262451172,4705.8959960938,-1790,224.25262451172) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), thaResourceStarting) That script is placed server side. if it is server-side, why are you using onClientResourceStart, which is client-side event? as for XML — your syntax is totally wrong: https://wiki.multitheftauto.com/wiki/Water Link to comment
Giovanni Posted February 17, 2011 Author Share Posted February 17, 2011 function thaResourceStarting( ) createWater(4730,-1802.9077148438,224.25262451172,4730,-1790,224.25262451172,4705.8959960938,-1802.9077148438,224.25262451172,4705.8959960938,-1790,224.25262451172) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), thaResourceStarting) That script is placed server side. if it is server-side, why are you using onClientResourceStart, which is client-side event? as for XML — your syntax is totally wrong: https://wiki.multitheftauto.com/wiki/Water Well that was failure #1. I fixed it now but it still doesn't work. Link to comment
eAi Posted February 17, 2011 Share Posted February 17, 2011 The XML syntax is for map files, so needs to be in a map file, not your meta.xml. Link to comment
Giovanni Posted February 17, 2011 Author Share Posted February 17, 2011 The XML syntax is for map files, so needs to be in a map file, not your meta.xml. Oh, I kind of knew that I made a mistake. Anyway I got this working now. Thanks for your support. I found another error i put into this code. You can lock this topic now. Thanks. 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