Jump to content

How to combine resources:


montenegro11

Recommended Posts

I can't run automatically resources, so I have to type it /start resourcename or run it on admin panel, I have resources with 3 gates, and I want to combine them all. Here's the script.

gate = createObject ( 980, 2404.8999023438, -1659, 15, 0, 0, 90 ) 
  
function gateOpen ( ) 
    moveObject ( gate, 2000, 2404.8999023438, -1659, 7 ) 
end 
addCommandHandler ( "gso", gateOpen ) 
  
function gateClose ( ) 
    moveObject ( gate, 2000, 2404.8999023438, -1659, 15 ) 
end 
addCommandHandler ( "gsc", gateClose ) 

Second:

gs1 = createObject ( 975, 2522.8999023438, -1722.1999511719, 13.39999961853, 0, 0, 179.74182128906 ) 
function gateOpen ( ) 
    moveObject ( gs1, 5000, 2515.3999023438, -1722.1999511719, 13.39999961853 ) 
end 
addCommandHandler ( "gss", gateOpen ) 
  
function gateClose ( ) 
    moveObject ( gs1, 5000, 2522.8999023438, -1722.1999511719, 13.39999961853 ) 
end 
addCommandHandler ( "gsd", gateClose ) 

Third:

gs2 = createObject ( 976, 2540.69995917719, -1707.8000488281, 11.5, 0, 0, 270 ) 
function gateOpen ( ) 
    moveObject ( gs2, 3000, 2540.69995917719, -1707.8000488281, 9.1999998092651 ) 
end 
addCommandHandler ( "cjo", gateOpen ) 
  
function gateClose ( ) 
    moveObject ( gs2, 3000, 2540.69995917719, -1707.8000488281, 11.5 ) 
end 
addCommandHandler ( "cjc", gateClose ) 

If somebody can help me, please do so.

Link to comment
gate = createObject ( 980, 2404.8999023438, -1659, 15, 0, 0, 90 ) 
  
function gateOpen ( ) 
    moveObject ( gate, 2000, 2404.8999023438, -1659, 7 ) 
end 
addCommandHandler ( "gso", gateOpen ) 
  
function gateClose ( ) 
    moveObject ( gate, 2000, 2404.8999023438, -1659, 15 ) 
end 
addCommandHandler ( "gsc", gateClose ) 
  
gs1 = createObject ( 975, 2522.8999023438, -1722.1999511719, 13.39999961853, 0, 0, 179.74182128906 ) 
function gateOpen1 ( ) 
    moveObject ( gs1, 5000, 2515.3999023438, -1722.1999511719, 13.39999961853 ) 
end 
addCommandHandler ( "gss", gateOpen1 ) 
  
function gateClose1 ( ) 
    moveObject ( gs1, 5000, 2522.8999023438, -1722.1999511719, 13.39999961853 ) 
end 
addCommandHandler ( "gsd", gateClose1 ) 
  
gs2 = createObject ( 976, 2540.69995917719, -1707.8000488281, 11.5, 0, 0, 270 ) 
function gateOpen2 ( ) 
    moveObject ( gs2, 3000, 2540.69995917719, -1707.8000488281, 9.1999998092651 ) 
end 
addCommandHandler ( "cjo", gateOpen2 ) 
  
function gateClose2 ( ) 
    moveObject ( gs2, 3000, 2540.69995917719, -1707.8000488281, 11.5 ) 
end 
addCommandHandler ( "cjc", gateClose2 ) 

Learning, kind of :)

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