MatXpl Posted January 6, 2011 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! MTA:SA scripts/gamemodes/misc: http://www.mtasa.xn.pl
SDK Posted January 6, 2011 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) Learn Lua - Learn to script - GUI scripting Scripter tools - Find/fix errors yourself(!) Don't pm me for scripting help, keep it for the Scripting subforum!
Castillo Posted January 6, 2011 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) 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