LeooN15 Posted November 6, 2011 Posted November 6, 2011 i´m trying to make the LSPD gate automatic to Admin acl group can anyone tell me what is wrong? root = getRootElement () LSgate1 = createObject ( 969, 1584.9000244141, -1637.9000244141, 12.39999961853, 0, 0, 0) -- enter the ID of the object followed by the coordinates -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. function Open ( pla ) if getElementType ( pla ) == "player" then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (LSgate1, 2500, 1584.9000244141, -1637.9000244141, 15.99999961853) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. end end end addEventHandler ( "onColShapeHit", col, Open) function Close ( pla ) if getElementType ( pla ) == "player" then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (LSgate1, 2500,1584.9000244141, -1637.9000244141, 12.39999961853) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. end end end addEventHandler ( "onColShapeLeave", col, Close ) Please help me
Jaysds1 Posted November 6, 2011 Posted November 6, 2011 Where's the colshape? You cant make a colshapehit event if there's no colshape.
LeooN15 Posted November 6, 2011 Author Posted November 6, 2011 Can you repair an put it please i have no idea about this
LeooN15 Posted November 6, 2011 Author Posted November 6, 2011 I dont know what is this can u explain please?
Jaysds1 Posted November 6, 2011 Posted November 6, 2011 I would recommend using the rectangle col shape: https://wiki.multitheftauto.com/wiki/CreateColRectangle
LeooN15 Posted November 6, 2011 Author Posted November 6, 2011 Please im new with LUA scripting, i dont know what is a colshape and i dont know how to put it.. Can anyone put the script with that "colshape" please:) Thanks
LeooN15 Posted November 6, 2011 Author Posted November 6, 2011 is in ls, a gate in the LSPD garage, Thanks for the help Jaysds1, you´re the best
Jaysds1 Posted November 6, 2011 Posted November 6, 2011 is in ls, a gate in the LSPD garage, Thanks for the help Jaysds1, you´re the best Welcome
LeooN15 Posted November 6, 2011 Author Posted November 6, 2011 Post it when you finish please:) thanks
Jaysds1 Posted November 6, 2011 Posted November 6, 2011 Ok, FINNALY I GOT IT: LSgate1 = createObject ( 969, 1584.9000244141, -1637.9000244141, 12.39999961853, 0, 0, 0) col = createColRectangle(1584.8251953125,-1644.04296875,10,15) addEventHandler ( "onColShapeHit", col, function(hitElement) if (getElementType (hitElement) == "player") then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(hitElement)), aclGetGroup ( "Admin" ) ) then moveObject (LSgate1, 2500, 1584.9000244141, -1637.9000244141, 15.99999961853) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. end end end) addEventHandler ( "onColShapeLeave", col, function(hitElement) if (getElementType (hitElement) == "player") then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(hitElement)), aclGetGroup ( "Admin" ) ) then moveObject (LSgate1, 2500,1584.9000244141, -1637.9000244141, 12.39999961853) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. end end end)
LeooN15 Posted November 6, 2011 Author Posted November 6, 2011 Only one thing to say... You´re incredible, Thanks
Jaysds1 Posted November 6, 2011 Posted November 6, 2011 Only one thing to say... You´re incredible, Thanks Welcome
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