golanu21 Posted March 2, 2013 Share Posted March 2, 2013 staff = createTeam ( Staff, 229, 229, 229 ) function Staff ( thePlayer ) local accName = getAccountName( getPlayerAccount(source) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admins" ) ) then setPlayerTeam ( thePlayer, staff ) setPedArmor ( thePlayer, 100 ) end end addEventHandler ( "onPlayerLogin", getRootElement(), Staff ) it is in server side Link to comment
iPrestege Posted March 2, 2013 Share Posted March 2, 2013 staff = createTeam ( "Staff", 229, 229, 229 ) function Staff () local accName = getAccountName( getPlayerAccount(source) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admins" ) ) then setPlayerTeam ( source, staff ) setPedArmor ( source, 100 ) end end addEventHandler ( "onPlayerLogin", getRootElement(), Staff ) Link to comment
TAPL Posted March 2, 2013 Share Posted March 2, 2013 You don't need getPlayerAccount, because the event onPlayerLogin already return the account. Read the parameter at wiki: https://wiki.multitheftauto.com/wiki/OnPlayerLogin 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