montenegro11 Posted January 10, 2014 Share Posted January 10, 2014 gate = createObject(980, 551.5, 1659.300488281, 8.8000001907349, 0, 0, 121.99768066406) function gateOpen() moveObject( gate, 2000, 551.59997558594, 165.1999511719, 14.30000190735 ) end addCommandHandler("grovegateo", gateOpen) function gateClose() moveObject( gate, 2000, 551.59997558594, 165.1999511719, 14.30000190735 ) end addCommandHandler("grovegatec", gateClose) This is the script for gates, it's working on other computers but on mine there's a problem. I don't know where to put this script, I have it in .lua file, and it's ok. now I don't want it as a resource because every time I'll have to /start resourcename and it's pissing me. Now, if somebody knows, where will I put the .lua file, or where will I import this "script" The help would be appreciated Link to comment
Castillo Posted January 10, 2014 Share Posted January 10, 2014 The only way you can run that script is by creating a resource. You can put it to auto start in the mtaserver.conf. Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 I'm a total noob when it comes to MTA, what's with the META file, how can I fix that? I'm fuckminded. How to install this resource HALP! <3 Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 And yeah, how to put autorun? I can't find it anywhere Link to comment
Castillo Posted January 10, 2014 Share Posted January 10, 2014 https://wiki.multitheftauto.com/wiki/Meta.xml https://wiki.multitheftauto.com/wiki/Resources About auto start, go to the end of "mtaserver.conf", there are many resources set to auto start. Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 I'm dumbfucked. I still don't know anything about what to do with that "meta" file if you could atleast help me a little Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 Call me retarded. But I don't know what to do with that, you might even freak out by now. Link to comment
Castillo Posted January 10, 2014 Share Posted January 10, 2014 First, go to your server directory and go to "resources" folder. Create a new folder inside called "gate", inside this folder, create a "meta.xml" file and paste the code I gave above, then create another file called "myScript.lua" and paste your gate script inside. Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 I've made some adjustments, and changed the gate towards the Grove Street, probbably messed up something, mind to check it? gate = createObject(2403, 1658, 15 ) function gateOpen() moveObject( gate, 2403, 1658, 7 ) end addCommandHandler("grovegateo", gateOpen) function gateClose() moveObject( gate, 2403, 1658, 15) end addCommandHandler("grovegatec", gateClose) Link to comment
Castillo Posted January 10, 2014 Share Posted January 10, 2014 gate = createObject ( 2403, 1658, 15 ) function gateOpen ( ) moveObject ( gate, 2000, 2403, 1658, 7 ) end addCommandHandler ( "grovegateo", gateOpen ) function gateClose ( ) moveObject ( gate, 2000, 2403, 1658, 15 ) end addCommandHandler ( "grovegatec", gateClose ) You forgot to fill the 'time' argument from moveObject. Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 That script you've brought to me, it brings me these warnings, what do I do? And yeah, yesterday I came up with an idea to get mta server. so dont judge me hah I'm totally helpless am I? Link to comment
Castillo Posted January 10, 2014 Share Posted January 10, 2014 gate = createObject ( 2403, 1658, 15 ) You forgot to specifiy the object model before "2403". Link to comment
ViRuZGamiing Posted January 10, 2014 Share Posted January 10, 2014 gate = createObject ( 2403, 1658, 15 ) You forgot to specifiy the object model before "2403". Just wanted to send that too.. Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 Testing it out, don't you go afk on me, I've got to make a surprise gate for my friend. Aaaand it doesn't work. Still this error and the script is: gate = createObject ( 980, 2403, 1658, 15 ) function gateOpen ( ) moveObject ( gate, 2000, 2403, 1658, 7 ) end addCommandHandler ( "grovegateo", gateOpen ) function gateClose ( ) moveObject ( gate, 2000, 2403, 1658, 15 ) end addCommandHandler ( "grovegatec", gateClose ) Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 And image isn't complete so, here's the link http://i.imgur.com/Xv5xrUF.jpg Link to comment
Castillo Posted January 10, 2014 Share Posted January 10, 2014 Did you restart the script? Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 (edited) Yes, let me try to do that again, but I'm not sure that it will fix the problem EDIT: Well, no errors appear, but the gate doesn't open, can you check the script? And yeah, can it be due to too long command? Edited January 10, 2014 by Guest Link to comment
Castillo Posted January 10, 2014 Share Posted January 10, 2014 I tried the script you posted last and it works. Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 I really don't know. I really don't know what's going on, let me change the command to gso and gsc gate = createObject ( 980, 2403, 1658, 15 ) function gateOpen ( ) moveObject ( gate, 2000, 2403, 1658, 7 ) end addCommandHandler ( "gso", gateOpen ) function gateClose ( ) moveObject ( gate, 2000, 2403, 1658, 15 ) end addCommandHandler ( "gsc", gateClose ) give me 2 minutes to test it Link to comment
Castillo Posted January 10, 2014 Share Posted January 10, 2014 The gate is created on the position: 2403, 1658, 15, is not at Grove Street though. Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 Nothing happens, even the gate doesn't appear, and I start the script first of all scripts. Edit: Err, lemme teleport to it, give me a bit though Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 FORGOT TO ADD THE MINUS IM SUCH A NOOBBBBBBB NOW LET ME TRY Link to comment
montenegro11 Posted January 10, 2014 Author Share Posted January 10, 2014 Well, I might not know the coordinates but can you edit the script so it goes like this, this is where the gate is supposed to be: x:2403 y:-1658 z:15 I might have messed it up, can you edit the script so it goes like this? Link to comment
Castillo Posted January 10, 2014 Share Posted January 10, 2014 gate = createObject ( 980, 2403, -1658, 15, 0, 0, 90 ) function gateOpen ( ) moveObject ( gate, 2000, 2403, -1658, 7 ) end addCommandHandler ( "gso", gateOpen ) function gateClose ( ) moveObject ( gate, 2000, 2403, -1658, 15 ) end addCommandHandler ( "gsc", gateClose ) 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