Nicolas ECM Posted March 17, 2014 Posted March 17, 2014 Hi who could tell me how to make only those of the group in acl can enter the anbu anbu team with a command function criminal(player) local team = getTeamFromName("Anbu") if ( team ) then if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Anbu" ) ) then setPlayerTeam(player, team) setPlayerNametagColor(player, 225, 0, 0) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) else outputChatBox ( "Usted no es Anbu!",thePlayer) end end end addCommandHandler("itac", criminal) help me
Castillo Posted March 17, 2014 Posted March 17, 2014 "accName" is not defined. You must use: getPlayerAccount + getAccountName
Castillo Posted March 17, 2014 Posted March 17, 2014 function criminal ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) local team = getTeamFromName("Anbu") if ( team ) then if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Anbu" ) ) then setPlayerTeam ( thePlayer, team ) setPlayerNametagColor ( thePlayer, 225, 0, 0 ) else outputChatBox ( "Usted no es Anbu!", thePlayer ) end end end addCommandHandler ( "itac", criminal )
Nicolas ECM Posted March 17, 2014 Author Posted March 17, 2014 thanks I doubt most could add any player acl group through a command?
Spajk Posted March 17, 2014 Posted March 17, 2014 It is possible with this function: https://wiki.multitheftauto.com/wiki/AclGroupAddObject
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