^_^ LOL ^_^ Posted January 12, 2014 Share Posted January 12, 2014 So i code a acl gates script but its not working. code: local gate1 = createObject( 2951,-1643.1999511719,1204.1999511719,6.3000001907349, 0, 0, 73 ) -- Local Functions function openGate1( hitElement ) if (getElementType(hitElement) == "BadBoys" ) then moveObject( gate1, 1500, -1643.1999511719,1204.1999511719,2 ) end end addCommandHandler("open", openGate1) function closeGate1( leftElement ) if (getElementType(leftElement) == "BadBoys" ) then moveObject( gate1, 1500, -1643.1999511719,1204.1999511719,6.3000001907349 ) end end addCommandHandler("close", closeGate1) Link to comment
ViRuZGamiing Posted January 12, 2014 Share Posted January 12, 2014 (edited) deleted Edited January 12, 2014 by Guest Link to comment
Bzz335 Posted January 12, 2014 Share Posted January 12, 2014 (edited) getElementType WTF.. Use: function 11 (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "NameOfACLgroup" ) ) then your code here end end Learn lua,guy. Edited January 12, 2014 by Guest Link to comment
^_^ LOL ^_^ Posted January 12, 2014 Author Share Posted January 12, 2014 Thanks, but whats problem know. local gate1 = createObject( 2951,-1643.1999511719,1204.1999511719,6.3000001907349, 0, 0, 73 ) -- Local Functions function(openGate1) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "BadBoys" ) ) then moveObject( gate1, 1500, -1643.1999511719,1204.1999511719,2 ) end end addCommandHandler("open", openGate1) function(closeGate1) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "BadBoys" ) ) then moveObject( gate1, 1500, -1643.1999511719,1204.1999511719,6.3000001907349 ) end end addCommandHandler("close", closeGate1) Link to comment
Bzz335 Posted January 12, 2014 Share Posted January 12, 2014 Do you created a ACL group? Added to group members? Say more about problem,i'm not Vanga. Link to comment
^_^ LOL ^_^ Posted January 12, 2014 Author Share Posted January 12, 2014 Yea i create group and i join group. Link to comment
^_^ LOL ^_^ Posted January 12, 2014 Author Share Posted January 12, 2014 5 line is wrong hes cant accept when is near "(" Link to comment
Bzz335 Posted January 12, 2014 Share Posted January 12, 2014 OMG! function(closeGate1) function(openGate1) Replace: function openGate1(thePlayer) function closeGate1(thePlayer) See,guy. function name (arguments) Link to comment
^_^ LOL ^_^ Posted January 12, 2014 Author Share Posted January 12, 2014 (edited) works but, commands doesnt work. //add dont work commands anyway. Edited January 12, 2014 by Guest Link to comment
Bzz335 Posted January 12, 2014 Share Posted January 12, 2014 addCommandHandler("close", closeGate1) addCommandHandler("open", openGate1) Debug? Link to comment
^_^ LOL ^_^ Posted January 12, 2014 Author Share Posted January 12, 2014 no errors on debug. Link to comment
Bzz335 Posted January 12, 2014 Share Posted January 12, 2014 Check,may be you aren't in group? Link to comment
^_^ LOL ^_^ Posted January 12, 2014 Author Share Posted January 12, 2014 (edited) I check, i am in group. code: local gate1 = createObject( 2951,-1643.1999511719,1204.1999511719,6.3000001907349, 0, 0, 73 ) -- Local Functions function openGate1 (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "BadBoys" ) ) then moveObject( gate1, 1500, -1643.1999511719,1204.1999511719,2 ) end end addCommandHandler("open", openGate1) function closeGate1 (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "BadBoys" ) ) then moveObject( gate1, 1500, -1643.1999511719,1204.1999511719,6.3000001907349 ) end end addCommandHandler("close", closeGate1) Edited January 12, 2014 by Guest Link to comment
Bzz335 Posted January 12, 2014 Share Posted January 12, 2014 (edited) use . function openGate1 (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "BadBoys" ) ) then moveObject( gate1, 1500, -1643.1999511719,1204.1999511719,2 ) else outputDebugString("Error") end end addCommandHandler("open", openGate1) function closeGate1 (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "BadBoys" ) ) then moveObject( gate1, 1500, -1643.1999511719,1204.1999511719,6.3000001907349 ) else outputDebugString("Error") end end addCommandHandler("close", closeGate1) Check debug,when you will be on marker. Edited January 12, 2014 by Guest Link to comment
^_^ LOL ^_^ Posted January 12, 2014 Author Share Posted January 12, 2014 but dont works. Link to comment
^_^ LOL ^_^ Posted January 12, 2014 Author Share Posted January 12, 2014 INFO: No Error! Link to comment
Bzz335 Posted January 12, 2014 Share Posted January 12, 2014 Omg,may be you just type incorrect command? Give me your acl.xml (PM) Link to comment
^_^ LOL ^_^ Posted January 12, 2014 Author Share Posted January 12, 2014 wait, i will goto offline. Add me skype reals12 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