Jump to content

[GATEMAKER] open a gate with rotation


Recommended Posts

Posted

Hello,

I found the resource "Gatemaker" and I love it. But could anyone help me to create a gate with rotation (like johnson garage or LSPD). There is some problems with this resource.

First, it lacks a rotation, so I can't rotate a barrier to when it will be raised.

Second, after making a barrier with the rotation, it moves to the point but does not change rotation.

I hope you'll can help me for this,

have a nice say,

dragonofdark

Posted

If I'm right, that resource wasn't made to change objects rotation. So you should just don't use that resource and make your own doors.

Posted

exacly. If you need help with scripting go to Scripting Section.

Please don't ask us how to do it, write some code and if it doesn't work, investigate some and if still doesn't work, THEN you go there. We are busy scripters huh.

  • 4 weeks later...
Posted

this is a script i download and its nor working.

its a gate but only For admins and does not work for the admins

the a51.lua

  
   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 ) 
  
   a51ent1 = createObject ( 971, -27.409915924072, 1922.7481689453, 20.217535018921, 0, 0, 271 ) 
   a51ent2 = createObject ( 971, -27.280824661255, 1913.9128417969, 20.217535018921, 0, 0, 270.99975585938 ) 
   a51entcol = createColCircle ( -26.899028778076, 1918.2679443359, 17.647617340088, 14 ) 
  
   a51gar1 = createObject ( 971, 313.4001159668, 1660.509765625, 20.298065185547, 0, 0, 0 ) 
   a51gar2 = createObject ( 971, 304.50546264648, 1660.5118408203, 20.298065185547, 0, 0, 0 ) 
   a51garcol = createColCircle ( 308.6823425293, 1661.8929443359, 18.018701553345, 14 ) 
  
function opena51gates(thePlayer) 
if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup( 'Admin' ) ) and hasObjectPermissionTo( thePlayer, 'function.door', false ) 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 isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup( 'Admin' ) ) and hasObjectPermissionTo( thePlayer, 'function.door', false ) 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 ) 
  
  
  
  
  
  
function opena51ent(thePlayer) 
if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup( 'Admin' ) ) and hasObjectPermissionTo( thePlayer, 'function.door', false ) then 
       moveObject (a51ent1, 5000, -27.4091796875, 1922.748046875, 7.967535018921) 
       moveObject (a51ent2, 5000, -27.280824661255, 1913.9128417969, 7.967535018921) 
end 
end 
addEventHandler( "onColShapeHit", a51entcol, opena51ent ) 
  
  
  
function closea51ent(thePlayer) 
if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup( 'Admin' ) ) and hasObjectPermissionTo( thePlayer, 'function.door', false ) then 
       moveObject (a51ent1, 5000, -27.409915924072, 1922.7481689453, 20.217535018921 ) 
       moveObject (a51ent2, 5000, -27.280824661255, 1913.9128417969, 20.217535018921 ) 
end 
end 
addEventHandler( "onColShapeLeave", a51entcol, closea51ent ) 
  
  
  
  
  
  
  
  
  
function opena51gar(thePlayer) 
if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup( 'Admin' ) ) and hasObjectPermissionTo( thePlayer, 'function.door', false ) then 
       moveObject (a51gar1, 5000, 313.4001159668, 1660.509765625, 10.967535018921) 
       moveObject (a51gar2, 5000, 304.50546264648, 1660.5118408203, 10.967535018921) 
end 
end 
addEventHandler( "onColShapeHit", a51garcol, opena51gar ) 
  
  
  
function closea51gar(thePlayer) 
if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( thePlayer ) ), aclGetGroup( 'Admin' ) ) and hasObjectPermissionTo( thePlayer, 'function.door', false ) then 
       moveObject (a51gar1, 5000, 313.4001159668, 1660.509765625, 20.298065185547 ) 
       moveObject (a51gar2, 5000, 304.50546264648, 1660.5118408203, 20.298065185547 ) 
end 
end 
addEventHandler( "onColShapeLeave", a51garcol, closea51gar ) 

here is the Meta.xml

<meta> 
    <info author="PenceSquad edited by Douks" type="script" version="1.0.0" /> 
    <script src="area51.lua"/> 
</meta> 

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