ramzi Posted January 4, 2014 Share 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" Link to comment
Plean Posted January 4, 2014 Share Posted January 4, 2014 Line 10 and 19 you have getPlayerAccount(pla). It should be thePlayer not pla? Link to comment
ramzi Posted January 4, 2014 Author Share 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 ) Link to comment
TAPL Posted January 4, 2014 Share Posted January 4, 2014 createColTube last two arguments should be radius and height not 0. Link to comment
ramzi Posted January 5, 2014 Author Share Posted January 5, 2014 createColTube last two arguments should be radius and height not 0. and how iget the Height and Radius? Link to comment
TAPL Posted January 5, 2014 Share 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 Link to comment
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