Jump to content

help gate


WASSIm.

Recommended Posts

the gates table is not exist you have to create it?
local getTable = { 
  
    {2990, 1284.2, -2056.4, 61.7, 0, 0, 90, 1284.2, -2056.4, 61.7, 2000, 10, "N..S.E", "N..S.E"}, 
  
function getGatesTable () 
    return getTable 
end 

Link to comment

You're simply using the wrong name.

This:

for ID=1,#gates do 

should be:

for ID=1,#gateMarkers do

for ID=1,#gateMarkers  do 
    local object, x, y, z, int, dim = gateMarkers[ID][1], gateMarkers[ID][2], gateMarkers[ID][3], gateMarkers[ID][4], gateMarkers[ID][5], gateMarkers[ID][6] 
    local theGateCol = createColSphere(x, y, z, gateMarkers[ID][12]) 
    local theGate = createObject (object, z, y, z, gateMarkers[ID][5], gateMarkers[ID][6], gateMarkers[ID][7]) 
    theGateColID[theGate] = ID 
    addEventHandler("onClientColShapeHit", theGateCol, gateOpen) 
    addEventHandler("onClientColShapeLeave", theGateCol, gateClose) 
end 

Link to comment

Replace:

local theGateColID = {} 
local gateMarkers = getGatesTable () 

with:

addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        theGateColID = { } 
        gateMarkers = getGatesTable ( ) 
    end 
) 

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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