donis123 Posted August 22, 2013 Share Posted August 22, 2013 Hi, i have a script with moving gate but it not working, and i cant find the problem ;/ local Gate = createObject ( 980, 1245.5, -767.40002441406, 93.800003051758, 0, 0, 0 ) local gateMarker = createMarker ( 1245.5999755859, -767.09997558594, 90.5, "cylinder", 10, 452, 152, 253, 523 ); local state = 0; addEventHandler("onMarkerHit", gateMarker, function ( hitElement ) local accName = getAccountName ( getPlayerAccount ( hitElement ) ) -- get his account name if isObjectInACLGroup ("User."..accName, aclGetGroup ( "Admin" ) ) then if ( state == 0 ) then moveObject ( Gate, 2500, 1245.5, -767.40002441406, 88.199996948242 ); state = 1; end else outputchatBox ( "You're not allowed to enter this area.", hitElement ); end end ); addEventHandler("onMarkerLeave", gateMarker, function ( hitElement ) local accName = getAccountName ( getPlayerAccount ( hitElement ) ) -- get his account name if isObjectInACLGroup ("User."..accName, aclGetGroup ( "Admin" ) ) then if ( state == 1 ) then moveObject ( Gate, 2500, 1245.5, -767.40002441406, 93.900001525879 ); state = 0; end else outputchatBox ( "You're not allowed to enter this area.", hitElement ); end end ); Link to comment
Castillo Posted August 22, 2013 Share Posted August 22, 2013 Change: if isObjectInACLGroup ( "User.".. accName, aclGetGroup ( "Admin" ) ) then to: if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then Link to comment
donis123 Posted August 22, 2013 Author Share Posted August 22, 2013 Change: if isObjectInACLGroup ( "User.".. accName, aclGetGroup ( "Admin" ) ) then to: if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then thanks you so much its works! ^^ 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