SannoX Posted March 31, 2015 Share Posted March 31, 2015 Hello there, I need help about meta.xml file, I am learning about scripting but I don't really get it function createTheGate () myGate = createObject ( MyObjectID, myGateX, MyGateY, MyGateZ ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate, 3000, NEWX, NEWY, NEWZ ) setTimer ( movingMyGateBack, 5000, 1 ) end addCommandHandler("openmodgate",openMyGate) function movingMyGateBack () moveObject ( myGate, 3000, myGateX, MyGateY, MyGateZ ) end Can you give me this meta.xml file please ? Link to comment
WhoAmI Posted March 31, 2015 Share Posted March 31, 2015 <meta> <script src="ENTER_YOUR_FILE_NAME_HERE.lua" type="server" /> </meta> It won't work anyway, because you have to type coordinates (x, y, z) as numbers into functions. Link to comment
dugasz1 Posted March 31, 2015 Share Posted March 31, 2015 https://wiki.multitheftauto.com/index.php?title=Meta.xml I think this is what you need. This page tell everything about meta, very usefull. Good luck for learning. Link to comment
SannoX Posted March 31, 2015 Author Share Posted March 31, 2015 Meta.xml file Lua file: function createTheGate () myGate = createObject ( 3095, 2489.6005859375, -1667.2998046875, 12.300000190735 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate, 3000, 2489.6000976563, -1667.3000488281, 10.10000038147 ) setTimer ( movingMyGateBack, 5000, 1 ) end addCommandHandler("gate1",openMyGate) function movingMyGateBack () moveObject ( myGate, 3000, 2489.5, -1667.8000488281, 20.799999237061 ) end It's should work? Link to comment
.:DoA:.Backflip Posted March 31, 2015 Share Posted March 31, 2015 If you want your name in the meta.xml you can have another line: "SannoX" name="Gate" description="put anything you want here" version="1.2.3" type="script" /> 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