ramzi Posted January 4, 2014 Posted January 4, 2014 col = createColTube (2287.1000976563, 605.70001220703, 12.39999961853, 0, 0) -- root = getRootElement () othergate1 = createObject ( 980, 2287.1000976563, 605.70001220703, 12.60000038147, 0, 0, 0) function Open (thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == "Army" ) then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (othergate1, 2500, 2287.1000976563, 605.70001220703, 6.9000000953674) end end end addEventHandler ( "onColShapeHit", col, Open) function Close (thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == "Army" ) then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (othergate1, 2500,2287.1000976563, 605.70001220703, 12.60000038147) end end end addEventHandler ( "onColShapeLeave", col, Close ) the Gates don't move why??"i am in team Army btw"
Plean Posted January 4, 2014 Posted January 4, 2014 Line 10 and 19 you have getPlayerAccount(pla). It should be thePlayer not pla?
ramzi Posted January 4, 2014 Author Posted January 4, 2014 i did like this, and it stills doesn't move! col = createColTube (2287.1000976563, 605.70001220703, 12.39999961853, 0, 0) -- root = getRootElement () othergate1 = createObject ( 980, 2287.1000976563, 605.70001220703, 12.60000038147, 0, 0, 0) function Open (thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == "Army" ) then moveObject (othergate1, 2500, 2287.1000976563, 605.70001220703, 6.9000000953674) end end addEventHandler ( "onColShapeHit", col, Open) function Close (thePlayer) if ( getTeamName(getPlayerTeam(thePlayer)) == "Army" ) then moveObject (othergate1, 2500,2287.1000976563, 605.70001220703, 12.60000038147) end end addEventHandler ( "onColShapeLeave", col, Close )
TAPL Posted January 4, 2014 Posted January 4, 2014 createColTube last two arguments should be radius and height not 0.
ramzi Posted January 5, 2014 Author Posted January 5, 2014 createColTube last two arguments should be radius and height not 0. and how iget the Height and Radius?
TAPL Posted January 5, 2014 Posted January 5, 2014 createColTube last two arguments should be radius and height not 0. and how iget the Height and Radius? r = Radius h = Height Tip: To visualize a colshape when writing scripts, use the client console command showcol
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now