sel3a Posted November 14, 2014 Share Posted November 14, 2014 Hello gentlemen, i'm trying to do something for a while but my idea didn't succeed anyway i'm trying to make an locked interior like there is a Team called Crazy Boys locked for them they are the only players who are able to enter the . Link to comment
Castillo Posted November 14, 2014 Share Posted November 14, 2014 What interior system are you using? Link to comment
AJXB Posted November 14, 2014 Share Posted November 14, 2014 if you're using the default MTA:SA Interiors resources, just edit the code and add if getPlayerTeam (hitElement,getTeamFromName("Crazy Boys")) then .. else return cancelEvent () end Link to comment
sel3a Posted November 14, 2014 Author Share Posted November 14, 2014 ye i'm I'm using the default MTA:SA Interiors or a teleport script like this. telea1 = createMarker ( 1976.8664550781,986.17248535156,53.738746643066, "arrow", 1.5, 43, 0, 43 ) addEventHandler ("onMarkerHit", telea1, function ( player ) setElementPosition ( player, 1986.685546875,950.34997558594,10.8203125 ) setElementDimension ( player, 0 ) end ) Link to comment
AJXB Posted November 14, 2014 Share Posted November 14, 2014 Use this: telea1 = createMarker ( 1976.8664550781,986.17248535156,53.738746643066, "arrow", 1.5, 43, 0, 43 ) addEventHandler ("onMarkerHit",root, function (hitElement) if source == telea1 then if getPlayerTeam (hitElement) == getTeamFromName ("Crazy Boys") then setElementPosition ( hitElement, 1986.685546875,950.34997558594,10.8203125 ) setElementDimension ( hitElement, 0 ) else return cancelEvent () end end end ) Link to comment
sel3a Posted November 14, 2014 Author Share Posted November 14, 2014 Thank you mate this was very helpful. Link to comment
sel3a Posted November 14, 2014 Author Share Posted November 14, 2014 Mate can i ask another question ? Link to comment
sel3a Posted November 15, 2014 Author Share Posted November 15, 2014 I'd like to make a moving gate like in real life gate,I have this script but It didn't work, I wont the both object to move right and left same as this one http://max.wilsonsd.org:8080/Clip_Art/Pmpa1/buildings/doors/iron_gate_open_close_hc.gif But using 2 gate objects in mtasa, anyone can help me to make it ? since it didn't work here is the script. i've tried to do this but heh.... didn't work a51gate1 = createObject ( 3049, 2491.2, -1661.3, 14.6 ) a51col = createColCircle ( 2492.2, -1663.3, 14.6 ) function opena51gates(thePlayer) local team = getPlayerTeam(thePlayer) if not team then return end if getTeamName(team) == "Criminals" then moveObject (a51gate1, 8000, 2491.2, -1661.3, 14.6 ) setTimer (moveObject, 3500, 1, a51gate1, 1000, 3049, 2491.2, -1661.3, 14.6, 0, 0, 306) ob1 = setTimer (function () end, 5000, 1) end end addEventHandler( "onColShapeHit", a51col, opena51gates ) end end addEventHandler( "onColShapeHit", a51col, opena51gates ) function closea51gates(thePlayer) local team = getPlayerTeam(thePlayer) if not team then return end if getTeamName(team) == "Criminals" then moveObject (a51gate1, 4000, 2491.2, -1661.3, 14.6 ) end end addEventHandler( "onColShapeLeave", a51col, closea51gates ) 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