HeK Posted May 6, 2012 Posted May 6, 2012 Hey guys, i need help on this script, i dont know what's wrong. When i do the command it gives a Bad argument on "getPlayerAccount", "getAccountName". function createAdminTeamOnStart () AdminTeam = createTeam ( "Staff", 250, 250, 250 ) end addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) function setAdminTeam() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then setPlayerTeam(source, AdminTeam) setElementModel(source, 217) end end addCommandHandler( "staff", setAdminTeam ) Zero is a number too.
Castillo Posted May 6, 2012 Posted May 6, 2012 function createAdminTeamOnStart ( ) AdminTeam = createTeam ( "Staff", 250, 250, 250 ) end addEventHandler ( "onResourceStart", resourceRoot, createAdminTeamOnStart ) function setAdminTeam ( thePlayer ) -- You forgot to define the player who used the command. if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Admin" ) ) then setPlayerTeam ( thePlayer, AdminTeam ) setElementModel ( thePlayer, 217 ) end end addCommandHandler ( "staff", setAdminTeam ) Read the comment. 1 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted May 6, 2012 Posted May 6, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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