TheLittleOG Posted February 8, 2016 Posted February 8, 2016 Hello guys. I have a problem... IdK whats, wrong, but i hope some1 can help me. All the time i get the errors.. My Code : function door=createObject (974, 267.70001220703, addEvent ( "Open", true ) function Open ( pla ) if getElementType ( pla ) == "player" then if vehicle or not vehicle then aclGroupListACL ( aclgroup, Admin ) if --here you can alter the group from Admin to whatever you require in your server but remember the rest must be the same i.e change everything where it says Admin to your desired group and add the users to that group. isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Admin" ) ) then moveObject (door, 2200, 2743.29998779297, -2298, 4.3000001907349) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. else return 0 end end end end addEventHandler ( "onColShapeHit", col, Open) addEventHandler ( "Open", root, Open) function Close ( pla ) if getElementType ( pla ) == "player" then if vehicle or not vehicle then aclGroupListACL ( aclgroup, Admin ) if isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Admin" ) ) then moveObject (door, 2951, 267.70001220703, -2298.1000976563, 4.3000001907349) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. else return 0 end end end end addEventHandler ( "onColShapeLeave", col, Close ) addEventHandler ( "Close", root, Close)
1LoL1 Posted February 8, 2016 Posted February 8, 2016 Hello guys. I have a problem... IdK whats, wrong, but i hope some1 can help me.All the time i get the errors.. My Code : function door=createObject (974, 267.70001220703, addEvent ( "Open", true ) function Open ( pla ) if getElementType ( pla ) == "player" then if vehicle or not vehicle then aclGroupListACL ( aclgroup, Admin ) if --here you can alter the group from Admin to whatever you require in your server but remember the rest must be the same i.e change everything where it says Admin to your desired group and add the users to that group. isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Admin" ) ) then moveObject (door, 2200, 2743.29998779297, -2298, 4.3000001907349) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. else return 0 end end end end addEventHandler ( "onColShapeHit", col, Open) addEventHandler ( "Open", root, Open) function Close ( pla ) if getElementType ( pla ) == "player" then if vehicle or not vehicle then aclGroupListACL ( aclgroup, Admin ) if isObjectInACLGroup ( "user."..getPlayerName(pla), aclGetGroup ( "Admin" ) ) then moveObject (door, 2951, 267.70001220703, -2298.1000976563, 4.3000001907349) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. else return 0 end end end end addEventHandler ( "onColShapeLeave", col, Close ) addEventHandler ( "Close", root, Close) Try this: door = createObject (974, 267.70001220703) -- here put cordinates function Open (pla) local vehicle = getPedOccupiedVehicle(pla) if getElementType ( pla ) == "player" then if vehicle or not vehicle then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (door, 2200, 2743.29998779297, -2298, 4.3000001907349) -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. else outputChatBox("text", pla, 255, 255, 255, true) end end end end addEventHandler("onColShapeHit", col, Open) addEventHandler("Open", root, Open) function Close ( pla ) local vehicle = getPedOccupiedVehicle(pla) if getElementType ( pla ) == "player" then if vehicle or not vehicle then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then moveObject (door, 2951, 267.70001220703, -2298.1000976563, 4.3000001907349) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. else outputChatBox("text", pla, 255, 255, 255, true) end end end end addEventHandler("onColShapeLeave", col, Close ) addEventHandler("Close", root, Close)
TheLittleOG Posted February 8, 2016 Author Posted February 8, 2016 @1LoL1 New errors : http://imgur.com/VII9OJX Thanks The help Stay Positive.
1LoL1 Posted February 8, 2016 Posted February 8, 2016 @1LoL1New errors : http://imgur.com/VII9OJX Thanks The help Stay Positive. 1 - Where is defined "col" ? 2 - Where you created door you must put cordinates x, y, z now it's there only 1 not 3. Example: createObject(id, x, y, z, 90, 0, 0)
TheLittleOG Posted February 8, 2016 Author Posted February 8, 2016 this is done..... The problem not solved http://imgur.com/JWqmLcp
1LoL1 Posted February 9, 2016 Posted February 9, 2016 this is done..... The problem not solvedhttp://imgur.com/JWqmLcp So delete addEventHandler("Open", getRootElement(), open) addEventHandler("Close", getRootElement(), close)
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