Eren97 Posted January 5, 2012 Posted January 5, 2012 Hey guys. I am rlly helpless. I made a Gate with gatemaker and now i have this code <gate x="277.03125" y="189.408203125" z="1007.171875" rx="0" ry="0" rz="0" x2="280.03125" y2="189.408203125" z2="1007.171875" rx2="0" ry2="0" rz2="0" objectID="974" team="false" collisionx="272.1728515625" collisionY="183.5166015625" collisionZ="1009.171875" collisionSize="10" raising="0" interiorID="3"></gate> Where the HELLA fuck to put it in and HOW the hella fuck. PLEASE help me. i am rlly new here and to scripting/mapping. Can i put it in a map too?or a lua script. how to put it in map,how to put it in lua. need fast answer pls. Im very silly about MTA Scripting
myonlake Posted January 5, 2012 Posted January 5, 2012 xmlCreateFile + all the other XML stuff If I helped you, please click the like button on the right Thanks!
Castillo Posted January 5, 2012 Posted January 5, 2012 If you made it with "gatemaker" resource, then why don't you read how it works? it must have some kind of documentation. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
myonlake Posted January 5, 2012 Posted January 5, 2012 Click that function that I displayed before. If I helped you, please click the like button on the right Thanks!
Castillo Posted January 5, 2012 Posted January 5, 2012 Just copy that line into "gates.xml" into "gatemaker" and restart the resource. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Eren97 Posted January 5, 2012 Author Posted January 5, 2012 where in gates.xml? will it create its own script then?
Castillo Posted January 5, 2012 Posted January 5, 2012 Unpack "gatemaker.zip" and open up "gates.xml", then copy your gate code into it. Like this: -- gates.xml: <gates> <gate x="277.03125" y="189.408203125" z="1007.171875" rx="0" ry="0" rz="0" x2="280.03125" y2="189.408203125" z2="1007.171875" rx2="0" ry2="0" rz2="0" objectID="974" team="false" collisionx="272.1728515625" collisionY="183.5166015625" collisionZ="1009.171875" collisionSize="10" raising="0" interiorID="3"></gate> </gates> San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted January 5, 2012 Posted January 5, 2012 Then what are you asking? you want to a script to use that gate but not gatemaker? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Eren97 Posted January 5, 2012 Author Posted January 5, 2012 i started gatemaker and did /addgate id and then i placed it and then pressed enter and then placed where it has to move and then enter and then where the collision area has to be... and then the code were in that file.and NOW what to DO with THAT code???
Castillo Posted January 5, 2012 Posted January 5, 2012 As far as I know "gatemarker" uses teams to restrict gates, so you should be in a team to be able to open it. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Eren97 Posted January 5, 2012 Author Posted January 5, 2012 its gatemakeR and it uses,but if i dont give it a Team,it uses my Team as default. But my question is how to put the code in a script,so it is seeable and usable
Castillo Posted January 5, 2012 Posted January 5, 2012 -- server side: gateCol = createColTube(275.57169, 190.07436, 1006.17188, 2, 2.5) setElementInterior(gateCol, 3) gate = createObject(974, 277.03125, 189.408203125, 1007.171875) setElementInterior(gate, 3) addEventHandler("onColShapeHit",gateCol, function (hitElement) moveObject(gate, 3000, 280.03125, 189.408203125, 1007.171875) setTimer(moveObject,6000,1,gate,3000,277.03125, 189.408203125, 1007.171875) end) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted January 5, 2012 Posted January 5, 2012 Read this: https://wiki.multitheftauto.com/wiki/Resources San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Eren97 Posted January 5, 2012 Author Posted January 5, 2012 i am under time pressure. Please just say what to do step by step on your own ...
Castillo Posted January 5, 2012 Posted January 5, 2012 Create a new resource in your "resources" folder and create two files: First: script.lua Then open it and copy this into it: gateCol = createColTube(275.57169, 190.07436, 1006.17188, 2, 2.5) setElementInterior(gateCol, 3) gate = createObject(974, 277.03125, 189.408203125, 1007.171875) setElementInterior(gate, 3) addEventHandler("onColShapeHit",gateCol, function (hitElement) moveObject(gate, 3000, 280.03125, 189.408203125, 1007.171875) setTimer(moveObject,6000,1,gate,3000,277.03125, 189.408203125, 1007.171875) end) Save the file and close it. Second: meta.xml Then open it and copy this into it: Save the file and close it. And third (last step): type /refresh in-game (logged in as admin) or refresh in server console, then start the resource. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Eren97 Posted January 5, 2012 Author Posted January 5, 2012 thank you. will try tmmrw.no time left. And what if i want other numbers?i mean another position and else... Edit: *what is what in the script.lua
Castillo Posted January 5, 2012 Posted January 5, 2012 Check the wiki arguments for these functions and you'll know which ones are the coordinates. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
JR10 Posted January 6, 2012 Posted January 6, 2012 gateCol = createColCircle(272.1728515625, 183.5166015625, 1009.171875, 10) setElementInterior(gateCol, 3) gate = createObject(974, 277.03125, 189.408203125, 1007.171875) setElementInterior(gate, 3) addEventHandler("onColShapeHit",gateCol, function (hitElement) moveObject(gate, 280.03125, 189.408203125, 1007.171875) end) 'hitElement' was used in moveObject instead of 'gate'. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Castillo Posted January 6, 2012 Posted January 6, 2012 Woops, my bad, thanks for seeing that JR10 . San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted January 6, 2012 Posted January 6, 2012 Yes, sorry, I used the wrong colshape . gateCol = createColTube(275.57169, 190.07436, 1006.17188, 2, 2.5) setElementInterior(gateCol, 3) gate = createObject(974, 277.03125, 189.408203125, 1007.171875) setElementInterior(gate, 3) addEventHandler("onColShapeHit",gateCol, function (hitElement) moveObject(gate, 3000, 280.03125, 189.408203125, 1007.171875) setTimer(moveObject,6000,1,gate,3000,277.03125, 189.408203125, 1007.171875) end) Now it works. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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