WASSIm. Posted June 29, 2013 Share Posted June 29, 2013 hi guys. this script not working. why ? exports [ "scoreboard" ]:addScoreboardColumn ( "Occupation", root, 2, occupation, 70 ) function updatePlayersACLscore ( ) for index, player in ipairs ( getElementsByType "player" ) do setElementData ( player, "Occupation", getElementData ( player, "getPlayerACL") ) end end setTimer ( updatePlayersACLscore, 2500, 0 ) function updatePlayersACL ( ) for index, player in ipairs ( getElementsByType "player" ) do local accountname = getAccountName (getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Console" ) ) then setElementData ( player, "getPlayerACL", Console ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then setElementData ( player, "getPlayerACL", Admin ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "SuperModerator" ) ) then setElementData ( player, "getPlayerACL", SuperModerator ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Moderator" ) ) then setElementData ( player, "getPlayerACL", Moderator ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Soldier" ) ) then setElementData ( player, "getPlayerACL", Soldier ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Police" ) ) then setElementData ( player, "getPlayerACL", Police ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Mechanic" ) ) then setElementData ( player, "getPlayerACL", Mechanic ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Everyone" ) ) then setElementData ( player, "getPlayerACL", Player ) elseif isGuestAccount ( getPlayerAccount ( player ) ) then setElementData ( player, "getPlayerACL", Guest ) else setElementData ( player, "getPlayerACL", N/A ) end end end setTimer ( updatePlayersACL, 500, 0 ) Link to comment
Castillo Posted June 29, 2013 Share Posted June 29, 2013 Because you aren't setting the element data as a string, here: setElementData ( player, "getPlayerACL", Console ) should be: setElementData ( player, "getPlayerACL", "Console" ) same thing on all others. Link to comment
WASSIm. Posted June 29, 2013 Author Share Posted June 29, 2013 thank you i have other problem if start script or stop or restart show me like this: [admin]/admin/server/admin_server.lua:1183: Access denied @ 'startResource' Link to comment
Castillo Posted June 29, 2013 Share Posted June 29, 2013 Make sure the admin resource is on the ACL group "Admin". Link to comment
WASSIm. Posted June 29, 2013 Author Share Posted June 29, 2013 Make sure the admin resource is on the ACL group "Admin". is already Link to comment
Castillo Posted June 29, 2013 Share Posted June 29, 2013 Try reinstalling the resource. Link to comment
WASSIm. Posted June 29, 2013 Author Share Posted June 29, 2013 Try reinstalling the resource. link ? Link to comment
Castillo Posted June 29, 2013 Share Posted June 29, 2013 Download latest resources from here: https://code.google.com/p/mtasa-resourc ... loads/list 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