ZodiacNL Posted July 15, 2010 Share Posted July 15, 2010 Hey, I'v got a resource which has a couple commands. Those commands are supposed to be for admins only but so far everyone can use them. I'v added the resource to the admin ACL group but that didn't work. Can someone help me? Thanks! Link to comment
50p Posted July 15, 2010 Share Posted July 15, 2010 You need to add users to the ACL which is allowed to use these commands and add the commands to the group which can use these commands. I know it may sound complicated but you need to learn more about ACL. I've had difficulties to understand it at the beginning too but you must learn them if you want to script. Also, for restricted parameter in addEventHandler use true. Link to comment
ZodiacNL Posted July 15, 2010 Author Share Posted July 15, 2010 It all sounds very cool but i have no idea how i'm gona do that could you help me step by step or something? I'v added the resource and the user, the user also gives me normal admin rights. Now I thought that I might need to change the resource itself to make sure only admins can use it? Link to comment
50p Posted July 15, 2010 Share Posted July 15, 2010 You need to add command name to any ACL (eg. Admin) which you have in Admin group and disable it for other players: Add this to <acl name="Default"> to disable the command for everyone <right name="command.YOURCOMMAND" access="false" /> And this to <acl name="Admin"> to allow admins to use it <right name="command.YOURCOMMAND" access="true" /> Also, for restricted parameter in addEventHandler use true. Link to comment
ZodiacNL Posted July 15, 2010 Author Share Posted July 15, 2010 Oke thank you, i'll try Link to comment
ZodiacNL Posted July 15, 2010 Author Share Posted July 15, 2010 You need to add command name to any ACL (eg. Admin) which you have in Admin group and disable it for other players: Add this to <acl name="Default"> to disable the command for everyone <right name="command.YOURCOMMAND" access="false" /> And this to <acl name="Admin"> to allow admins to use it <right name="command.YOURCOMMAND" access="true" /> Did this, where do i use that addEventHandler? Also in the ACL? Also, for restricted parameter in addEventHandler use true. Link to comment
50p Posted July 15, 2010 Share Posted July 15, 2010 Hey,I'v got a resource which has a couple commands. Those commands are supposed to be for admins only but so far everyone can use them. I'v added the resource to the admin ACL group but that didn't work. Can someone help me? Thanks! Inside the resource... Find scripts which have addCommandHandler's and add true. Link to comment
ZodiacNL Posted July 15, 2010 Author Share Posted July 15, 2010 function movingMyGateBack4 () moveObject ( myGate4, 3000, 266.2236328125, 1884.234375, 16.355909347534, 0, 0, 0 ) end addCommandHandler("closegate5",movingMyGateBack4) where do I add it? Link to comment
50p Posted July 15, 2010 Share Posted July 15, 2010 addCommandHandler("closegate5",movingMyGateBack4, true) Link to comment
ZodiacNL Posted July 15, 2010 Author Share Posted July 15, 2010 Edit: It works thank you very much! I wasnt searching in the right part of the ACL. Link to comment
ZodiacNL Posted July 16, 2010 Author Share Posted July 16, 2010 could you help me with this one too? https://forum.multitheftauto.com/viewtop ... 29#p316229 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