GamingTim Posted February 9, 2014 Posted February 9, 2014 Alright i'm totally new to coding but i know "some" basics. I'm not sure on how to set a player to an admin team if he's an admin when he joins. I created a team on the default MTA admin panel but when I reconnect it doesn't set the player which was added as an admin to the admin team. what code should I add? or which ones should i use?
Anubhav Posted February 9, 2014 Posted February 9, 2014 local team = createTeam("Admin",255,255,255) function team() if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setPlayerTeam(source,Admin) else cancelEvent() end addEventHandler("onPlayerJoin",thePlayer,team) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
GamingTim Posted February 9, 2014 Author Posted February 9, 2014 Thanks but it didn't work so i changed the onPlayerJoin to onPlayerLogin still the same.
DNL291 Posted February 9, 2014 Posted February 9, 2014 local team = createTeam("Admin",255,255,255) function setTeam(_, acc) if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("Admin")) then setPlayerTeam(source, team) end end addEventHandler("onPlayerLogin",root, setTeam) Please do not PM me with scripting related question nor support, use the forums instead.
GamingTim Posted February 9, 2014 Author Posted February 9, 2014 local team = createTeam("Admin",255,255,255) function setTeam(_, acc) if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("Admin")) then setPlayerTeam(source, team) end end addEventHandler("onPlayerLogin",root, setTeam) Thanks alot mate!
DNL291 Posted February 9, 2014 Posted February 9, 2014 You're welcome. Please do not PM me with scripting related question nor support, use the forums instead.
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