Jump to content

add an interior number?


5150

Recommended Posts

hey, could someone tell me how to make this script work in interior 6?

local cell = createObject(2930, 1562.3000488281, -1634.3800048828, -87.699996948242, 0,0,90) 
  
function open() 
     
    moveObject(cell, 3000, 1560.6, -1634.3800048828, -87.699996948242, 0,0,0) 
     
end 
  
addCommandHandler("AD1o", open) 
addCommandHandler("ADopenall", open) 
  
function close() 
     
    moveObject(cell, 3000, 1562.3000488281, -1634.3800048828, -87.699996948242, 0,0,0) 
end 
  
addCommandHandler("AD1c", close) 
addCommandHandler("ADcloseall", open) 

Link to comment

so is this correct?

local cell = createObject(2930, 1562.3000488281, -1634.3800048828, -87.699996948242, 0,0,90) 
setElementInterior (2930, 6) 
  
function open() 
    
    moveObject(cell, 3000, 1560.6, -1634.3800048828, -87.699996948242, 0,0,0) 
    
end 
  
addCommandHandler("AD1o", open) 
addCommandHandler("ADopenall", open) 
  
function close() 
    
    moveObject(cell, 3000, 1562.3000488281, -1634.3800048828, -87.699996948242, 0,0,0) 
end 
  
addCommandHandler("AD1c", close) 
addCommandHandler("ADcloseall", open) 

Link to comment
local cell = createObject(2930, 1562.3000488281, -1634.3800048828, -87.699996948242, 0,0,90) 
setElementInterior (cell, 6) 
  
function open() 
    
    moveObject(cell, 3000, 1560.6, -1634.3800048828, -87.699996948242, 0,0,0) 
    
end 
  
addCommandHandler("AD1o", open) 
addCommandHandler("ADopenall", open) 
  
function close() 
    
    moveObject(cell, 3000, 1562.3000488281, -1634.3800048828, -87.699996948242, 0,0,0) 
end 
  
addCommandHandler("AD1c", close) 
addCommandHandler("ADcloseall", open) 

Link to comment

hey one more question sorry....

if i want to allow the gate to open for only my team, is this correct?

local gate1 = createObject(2930, 1575.2001953125, -1634.7001953125, -87.699996948242, 0,0,0) 
setElementInterior (gate1, 6) 
  
function open() 
   local team = getPlayerTeam(thePlayer) 
    if (team == "#000000Psycho Ma#990000ns Gang") then 
    moveObject(gate1, 3000, 1575.2, -1636.1999511719, -87.699996948242, 0,0,0) 
    
end 
 end 
addCommandHandler("gate1", open) 
  
function close() 
   local team = getPlayerTeam(thePlayer) 
    if (team == "#000000Psycho Ma#990000ns Gang") then 
    moveObject(cell8, 3000, 1575.2001953125, -1634.7001953125, -87.699996948242, 0,0,0) 
end 
 end 
addCommandHandler("gate1c", close) 
addCommandHandler("PMGCcloseall", close) 

Link to comment
  
local gate1 = createObject(2930, 1575.2001953125, -1634.7001953125, -87.699996948242, 0,0,0) 
setElementInterior (gate1, 6) 
  
function open(thePlayer) 
   local team = getTeamName(getPlayerTeam(thePlayer)) 
    if (team == "#000000Psycho Ma#990000ns Gang") then 
    moveObject(gate1, 3000, 1575.2, -1636.1999511719, -87.699996948242, 0,0,0) 
    
end 
 end 
addCommandHandler("gate1", open) 
  
function close(thePlayer) 
   local team = getTeamName(getPlayerTeam(thePlayer)) 
    if (team == "#000000Psycho Ma#990000ns Gang") then 
    moveObject(cell8, 3000, 1575.2001953125, -1634.7001953125, -87.699996948242, 0,0,0) 
end 
  

Link to comment
  
local gate1 = createObject(2930, 1575.2001953125, -1634.7001953125, -87.699996948242, 0,0,0) 
setElementInterior (gate1, 6) 
  
local AllowedToOpen = "ADD YOUR TEAM HERE"  
  
function open(thePlayer) 
if getElementType(thePlayer) == "player" then 
local myTeam = getPlayerTeam(thePlayer) 
if myTeam == getTeamFromName( AllowedToOpen ) then  
moveObject(gate1, 3000, 1575.2, -1636.1999511719, -87.699996948242, 0,0,0)   
end 
end 
end 
addCommandHandler("gate1", open) 
  
function close(thePlayer) 
if getElementType(thePlayer) == "player" then 
local myTeam = getPlayerTeam(thePlayer) 
if myTeam == getTeamFromName( AllowedToOpen ) then     
moveObject(gate1, 3000, 1575.2001953125, -1634.7001953125, -87.699996948242, 0,0,0) 
end 
end 
end 
addCommandHandler("gate1c", close) 
addCommandHandler("PMGCcloseall", close) 
  

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