Seaton Posted January 30, 2010 Posted January 30, 2010 Alright, in MTA theres the "smashbar" object, which I believe is the one that on msot servers is used that raises upwards to open up, if not correct me with the name of the proper one, what i'm asking is.. what do I need to do, to construct this gate, do I only need the bar? Also, how do you any door, like Airport door and what-not. sorry this is my first day with MTA.
WallMart Posted February 2, 2010 Posted February 2, 2010 i dont know if you can make a gate with just objects.... doesnt it need to be scripted or something? Just.... just skip this..
dzek (varez) Posted February 5, 2010 Posted February 5, 2010 it need scripting indeed Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
WallMart Posted February 5, 2010 Posted February 5, 2010 sorry cant help you with that im very bad at scripting, maybe you can ask gamesnert or DarkDragon[GER] Just.... just skip this..
Dark Dragon Posted February 5, 2010 Posted February 5, 2010 this should be at the scripting section but yes. local openArea = createColCuboid(x,y,z,width,depth,height) --you need to replace x,y,z,width,depth,height here local door = createObject(modelid,x,y,z,rotx,roty,rotz) --you need to replace modelid,x,y,z,rotx,roty,rotz here function openTheDoor(element) local move = false if getElementType(element) == "player" then move = true elseif getElementType(element) == "vehicle" then if getVehicleOccupant(element,0) then move = true end end if move then moveObject(door,timetomove,x,y,z,rotx,roty,rotz) --you need to replace timetomove,x,y,z,rotx,roty,rotz here end end addEventHandler("onColShapeHit",openArea,openTheDoor) function closeTheDoor(element) local move = true for i,v in ipairs(getElementsWithinColShape(openArea)) do if getElementType(v) == "player" then move = false break elseif getElementType(v) == "vehicle" then if getVehicleOccupant(v,0) then move = false break end end end if move then moveObject(door,timetomove,oldx,oldy,oldz,oldrotx,oldroty,oldrotz) --you need to replace timetomove,oldx,oldy,oldz,oldrotx,oldroty,oldrotz here end end addEventHandler("onColShapeLeave",openArea,closeTheDoor) untested and of course you have to place all the values correctly in order to make it work. if you need further help, just ask Loads of fun for free! Also a lot of fun for free!
Seaton Posted February 7, 2010 Author Posted February 7, 2010 Does anyone know how to script it, so factions can only opena certain gate?
Dark Dragon Posted February 9, 2010 Posted February 9, 2010 if you set up teams you can easily check if the players team matches the one which should be able to open the door Loads of fun for free! Also a lot of fun for free!
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