Jump to content

Locked Marker!! Help Please...


sel3a

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...