Zie[E]D_)"U.R Posted June 11, 2017 Share Posted June 11, 2017 Hello i hope i am posting this in the correct section . i am new when it comes to scripting etc .. i have recently created a server and i had a few problems concerning assigning specific resources to a specific Group . Let me explain : i have created a new group via ACL.xml named VIP i wanted to assign a health regeneration resource to that group (only to that group) it is a resource that imply allows you to renegrate lost health over time . and this is what i wrote : <group name="V.I.P"> <object name="resource.healthregeneration"></object> <object name="user.example"></object> </group> i also added the resource on mtaserver.conf (i dont know if it is obivous , lol) but it appears that everyone has their health regenerated (guest/ admin etc) ! not only VIP group any help ? please give me an explanation that a simple mind can bear i am not that pro at programming (still learning) thank you in advance :). Link to comment
Zie[E]D_)"U.R Posted June 11, 2017 Author Share Posted June 11, 2017 Update : i added this in the resource script addEventHandler("onClientPlayerJoin", getRootElement(), autor, true) i also added this in the acl.xml under each group acl <right name="resource.healthregeneration" access="false"></right> and i added this under VIP acl <right name="resource.healthregeneration" access="true"></right> still didnt work ! Link to comment
Tekken Posted June 12, 2017 Share Posted June 12, 2017 It doesn't work that way but anyway you are on the wrong board you should post it to Scripting board. So you want a resource that give's you health if you are a VIP right? So what you should do is: - Create VIP Group in acl.xml (already done) - Add the specific players there. ( Like this user.USERNAME ) - Now make the resource but like this now: addCommandHandler("viphealth", function(player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("VIP")) then setElementHealth(player, 1000). end end); 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