MatXpl Posted January 6, 2011 Share Posted January 6, 2011 function ta(thePlayer, command, who, amount) local ne = getPlayerFromName ( who ) local e = getPlayerName ( thePlayer ) if isObjectInACLGroup ( "user." .. e, aclGetGroup ( "Admin" ) ) then takePlayerMoney (ne, math.abs(tonumber(amount))) end end addCommandHandler ("take", ta) Dosn't work Plase help, thanks! Link to comment
SDK Posted January 6, 2011 Share Posted January 6, 2011 Use [ lua][ /lua] I'm not sure what's wrong, what is the problem exactly? function take(thePlayer, command, who, amount) local taker = getPlayerName ( thePlayer ) local takeFrom = getPlayerFromName ( who ) if takeFrom and isObjectInACLGroup ( "user." .. taker, aclGetGroup ( "Admin" ) ) then takePlayerMoney (takeFrom, math.abs(tonumber(amount))) end end addCommandHandler ("take", take) Link to comment
Castillo Posted January 6, 2011 Share Posted January 6, 2011 function take(thePlayer, command, who, amount) local takeFrom = getPlayerFromName ( who ) if takeFrom and isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup ( "Admin" ) ) then takePlayerMoney (takeFrom, math.abs(tonumber(amount))) end end addCommandHandler ("take", take) 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