DonPro Posted January 9, 2014 Share Posted January 9, 2014 Hey people. im up for make maps and maby a server and need help to make a Moving gate, and a marker to transport from outside the house and into the house (building) can anyone maby make one for me and tell me what to put into it? i need it realy fast. Link to comment
The Killer Posted January 9, 2014 Share Posted January 9, 2014 ok you can use for the moving gate: Event 'onMarkerHit' createMarker createObject -- for the gate moveObject -- when the player hit the marker the gate move for the house: Event 'onMarkerHit' createMarker setElementPosition -- to make the player who hit the marker enter the house setElementInterior -- if the house in interior ! Link to comment
DonPro Posted January 9, 2014 Author Share Posted January 9, 2014 ok you can usefor the moving gate: Event 'onMarkerHit' createMarker createObject -- for the gate moveObject -- when the player hit the marker the gate move for the house: Event 'onMarkerHit' createMarker setElementPosition -- to make the player who hit the marker enter the house setElementInterior -- if the house in interior ! Bro last time i did this i had a bigger script for the moving gate! can you show me a bigger and where i can place the (location) of the gate and the interior marker in another script? pleas Link to comment
The Killer Posted January 9, 2014 Share Posted January 9, 2014 will, try this : local marker = createMarker(x,y,z, "cylinder", 5, 255, 0, 0) local object = createObject(980, x,y,z) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, x,y,z) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, x,y,z) -- move the gate back ! end ) local marker = createMarker(x,y,z, "cylinder", 1.5, 255, 0, 0) addEventHandler("onMarkerHit", marker, function (player) setElementPosition(player, x,y,z) setElementInterior(player, number) -- change number to the house number ! end ) Link to comment
DonPro Posted January 9, 2014 Author Share Posted January 9, 2014 will, try this : local marker = createMarker(x,y,z, "cylinder", 5, 255, 0, 0) local object = createObject(980, x,y,z) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, x,y,z) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, x,y,z) -- move the gate back ! end ) local marker = createMarker(x,y,z, "cylinder", 1.5, 255, 0, 0) addEventHandler("onMarkerHit", marker, function (player) setElementPosition(player, x,y,z) setElementInterior(player, number) -- change number to the house number ! end ) Alraight thanksbro! i will try! ^^ Link to comment
DonPro Posted January 9, 2014 Author Share Posted January 9, 2014 will, try this : local marker = createMarker(x,y,z, "cylinder", 5, 255, 0, 0) local object = createObject(980, x,y,z) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, x,y,z) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, x,y,z) -- move the gate back ! end ) local marker = createMarker(x,y,z, "cylinder", 1.5, 255, 0, 0) addEventHandler("onMarkerHit", marker, function (player) setElementPosition(player, x,y,z) setElementInterior(player, number) -- change number to the house number ! end ) lol it wont work local marker = createMarker(2774.3999023438,-2418.1000976563,12.300000190735, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.1999511719,-2417.8999023438,14.39999961853) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.1999511719,-2417.8999023438,16.89999961853) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.1999511719,-2417.8999023438,14.39999961853,) -- move the gate back ! end ) Link to comment
The Killer Posted January 10, 2014 Share Posted January 10, 2014 try this: local marker = createMarker(2774.49,-2418.1,12.3, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.29,-2417.99,14.49) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.29,-2417.99,16.99) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.2,-2417.99,14.4) end ) Link to comment
DonPro Posted January 10, 2014 Author Share Posted January 10, 2014 try this: local marker = createMarker(2774.49,-2418.1,12.3, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.29,-2417.99,14.49) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.29,-2417.99,16.99) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.2,-2417.99,14.4) end ) Hmm no error ;S i made a Map in this Resource folder and puted in this map with the script in. OH OH OH! now i know the problem! last time i had a META also! so this is the LUA right? Link to comment
DonPro Posted January 10, 2014 Author Share Posted January 10, 2014 try this: local marker = createMarker(2774.49,-2418.1,12.3, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.29,-2417.99,14.49) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.29,-2417.99,16.99) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.2,-2417.99,14.4) end ) Still not working i tryed to change some shit to but yeah not working the Meta and Lua file is no errors and no errors in the files Link to comment
.:HyPeX:. Posted January 10, 2014 Share Posted January 10, 2014 try this: local marker = createMarker(2774.49,-2418.1,12.3, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.29,-2417.99,14.49) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.29,-2417.99,16.99) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.2,-2417.99,14.4) end ) Hmm no error ;S i made a Map in this Resource folder and puted in this map with the script in. OH OH OH! now i know the problem! last time i had a META also! so this is the LUA right? Dude do you know scripting at all? you need to place a code into the meta and load it, just start reading imo.. https://wiki.multitheftauto.com/wiki/Sc ... troduction Link to comment
DonPro Posted January 10, 2014 Author Share Posted January 10, 2014 try this: local marker = createMarker(2774.49,-2418.1,12.3, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.29,-2417.99,14.49) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.29,-2417.99,16.99) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.2,-2417.99,14.4) end ) Hmm no error ;S i made a Map in this Resource folder and puted in this map with the script in. OH OH OH! now i know the problem! last time i had a META also! so this is the LUA right? Dude do you know scripting at all? you need to place a code into the meta and load it, just start reading imo.. https://wiki.multitheftauto.com/wiki/Sc ... troduction i have done some scripts before but i dont remember some about it Link to comment
DonPro Posted January 11, 2014 Author Share Posted January 11, 2014 try this: local marker = createMarker(2774.49,-2418.1,12.3, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.29,-2417.99,14.49) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.29,-2417.99,16.99) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.2,-2417.99,14.4) end ) Hmm no error ;S i made a Map in this Resource folder and puted in this map with the script in. OH OH OH! now i know the problem! last time i had a META also! so this is the LUA right? Dude do you know scripting at all? you need to place a code into the meta and load it, just start reading imo.. https://wiki.multitheftauto.com/wiki/Sc ... troduction the only problem i got now is that... the "GATE" wont show ingame i have started it and all running fine but it wont show ingame so yeah maby i should change object or something? or any problems? Link to comment
The Killer Posted January 11, 2014 Share Posted January 11, 2014 try this the code: local marker = createMarker(2774.49,-2418.1,12.3, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.29,-2417.99,14.49) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.29,-2417.99,16.99) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.2,-2417.99,14.4) end ) the meta: "" description="" type="script" version="1.0" /> Link to comment
DonPro Posted January 12, 2014 Author Share Posted January 12, 2014 try thisthe code: local marker = createMarker(2774.49,-2418.1,12.3, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.29,-2417.99,14.49) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.29,-2417.99,16.99) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.2,-2417.99,14.4) end ) the meta: "" description="" type="script" version="1.0" /> okay i got it to work now! and im on my another gate now.. and how can change rotation on the gate? ^^ i tryet write (0,0,90) back of the location! but that didnt work Link to comment
DonPro Posted January 12, 2014 Author Share Posted January 12, 2014 try this: local marker = createMarker(2774.49,-2418.1,12.3, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.29,-2417.99,14.49) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.29,-2417.99,16.99) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.2,-2417.99,14.4) end ) or forget it i was stupid.. haha i was restart the wrong file and write in wrong LUA! haha so i see now its working i find out how! thanks anyway! ^^ Link to comment
DonPro Posted January 12, 2014 Author Share Posted January 12, 2014 try thisthe code: local marker = createMarker(2774.49,-2418.1,12.3, "cylinder", 7, 0, 0, 255, 0) local object = createObject(10182, 2774.29,-2417.99,14.49) addEventHandler("onMarkerHit", marker, function () moveObject(object, 2000, 2774.29,-2417.99,16.99) end ) addEventHandler("onMarkerLeave", marker, function () moveObject(object, 2000, 2774.2,-2417.99,14.4) end ) the meta: "" description="" type="script" version="1.0" /> a last problem! hehe im now making this interior and it works when i hit the marker FROM the base to the interior but not back! so yeah local marker = createMarker(2715.19,-2537.69,14.5, "arrow", 1, 239, 213, 0) addEventHandler("onMarkerHit", marker, function (player) setElementPosition(player, 2541.7,-1304.01,1024.07) setElementInterior(player, 2) -- change number to the house number ! end ) Link to comment
Castillo Posted January 12, 2014 Share Posted January 12, 2014 What do you mean by "not back"? Link to comment
DonPro Posted January 12, 2014 Author Share Posted January 12, 2014 What do you mean by "not back"? i hit the marker and i end up in the place i want to (Place = interior) but when i try hit the marker in the interior i cant get back to the base aigen! Link to comment
Castillo Posted January 12, 2014 Share Posted January 12, 2014 And you did place a marker in the interior? Link to comment
DonPro Posted January 12, 2014 Author Share Posted January 12, 2014 And you did place a marker in the interior? no create marker is down in the base not in the interior? hmm i dont know the problem in it ;S Link to comment
.:HyPeX:. Posted January 13, 2014 Share Posted January 13, 2014 And you did place a marker in the interior? no create marker is down in the base not in the interior? hmm i dont know the problem in it ;S A marker deploys "onClientMarkerHit" at that marker at that place, it wont do anything to the location ur going IF you are, to come back you should create a marker at the destination (not exactly same at it will create a loop) but close to go back. Link to comment
xXMADEXx Posted January 13, 2014 Share Posted January 13, 2014 Just saying, you're not going to learn anything if you're asking other people to do it for you. Link to comment
DonPro Posted January 13, 2014 Author Share Posted January 13, 2014 Just saying, you're not going to learn anything if you're asking other people to do it for you. im learning much dude, they tell me what to do and i try figger out by my self how to do it. but i have read some about scripting to! thanks to you all! 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