SilvaSilva Posted November 23, 2020 Share Posted November 23, 2020 Hello, Im trying to do a script that tells me how many people there are in one ACL but im having a hard time trying to find which are the right instructions. If anyone could help i would be thankful Link to comment
Tekken Posted November 23, 2020 Share Posted November 23, 2020 getAccounts() will return a table with all accounts so you can loop trough and check if is in acl group using isObjectInACLGroup() Link to comment
SilvaSilva Posted November 23, 2020 Author Share Posted November 23, 2020 47 minutes ago, Tekken said: getAccounts() will return a table with all accounts so you can loop trough and check if is in acl group using isObjectInACLGroup() Im sorry but can you give me an example? Link to comment
ViRuZGamiing Posted November 23, 2020 Share Posted November 23, 2020 All info on getAccounts is on the wiki: https://wiki.multitheftauto.com/wiki/GetAccounts calling this function on the serverside will return a table, a table can be looped over for example by using a for loop. So every loop you can use the account to pass in the required arguments for isObjectInACLGroup (https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup). isObjectInACLGroup needs an object and a group as you can see in the example. The object is string formatted as user.username so "user."..getAccountName(account) The group which you get returned from aclGetGroup ( "groupname" ) Link to comment
Scripting Moderators xLive Posted November 23, 2020 Scripting Moderators Share Posted November 23, 2020 1 hour ago, Tekken said: getAccounts() will return a table with all accounts so you can loop trough and check if is in acl group using isObjectInACLGroup() I suggest to use aclGroupListObjects instead of looping a huge table of all accounts Link to comment
Tekken Posted November 23, 2020 Share Posted November 23, 2020 47 minutes ago, xLive said: I suggest to use aclGroupListObjects instead of looping a huge table of all accounts Didn’t know that one existed 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