Jump to content

Looking for a New Gate Script


Recommended Posts

Im looking for a Gate Script where it generates a gate to open and close while moving. If you have one or you can find one please give me one and post it here. Also if it opens for a special skin That would be Even better. So if you can post one here please do and you will be awesome to me.

Link to comment

The current "gatemaker" , saves who can move that gate via team , he asks for skin.

As you see in the following example :

  
   a51gate1 = createObject ( 2929, 215.99548339844, 1875.40234375, 13.938992500305, 0, 0, 0 ) 
   a51gate2 = createObject ( 2929, 211.94564819336, 1875.40234375, 13.938992500305, 0, 0, 0 ) 
   a51col = createColCircle ( 213.94564819336, 1875.40234375, 13.938992500305, 7 ) 
  
function opena51gates(thePlayer) 
if getElementModel( thePlayer ) == 287 then 
       moveObject (a51gate1, 5000, 218.99548339844, 1875.40234375, 13.938992500305 ) 
       moveObject (a51gate2, 5000, 208.94564819336, 1875.40234375, 13.938992500305 ) 
end 
end 
addEventHandler( "onColShapeHit", a51col, opena51gates ) 
  
function closea51gates(thePlayer) 
if getElementModel( thePlayer ) == 287 then 
       moveObject (a51gate1, 5000, 215.99548339844, 1875.40234375, 13.938992500305 ) 
       moveObject (a51gate2, 5000, 211.94564819336, 1875.40234375, 13.938992500305 ) 
end 
end 
addEventHandler( "onColShapeLeave", a51col, closea51gates ) 

(Source : https://community.multitheftauto.com/index.php?p= ... ils&id=812 )

You can make a "circle" , that when he enters there , you can check his skin , and if he has the right skin , make moveObject , if he doesn't do "return end"

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...