pepsi18 Posted May 26, 2014 Share Posted May 26, 2014 what is the problem me the script does not work addCommandHandler ( "money", function ( player, _, who, clan ) local playerWho = findPlayerByName( who ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then if ( playerWho ) then local money = tonumber ( money ) if ( money ) then takePlayerMoney ( playerwho, tostring ( money - 0) ) outputChatBox ("Tu dinero disminuyo en ", playerWho, 255, 255, 255, true) end end end end ) function findPlayerByName (name) local player = getPlayerFromName(name) if player then return player end for i, player in ipairs(getElementsByType("player")) do if string.find(string.gsub(getPlayerName(player):lower(),"#%x%x%x%x%x%x", ""), name:lower(), 1, true) then return player end end return false end Link to comment
Chronic Posted May 26, 2014 Share Posted May 26, 2014 In line 6 you put local money = tonumber ( money ) money is never defined. Link to comment
TAPL Posted May 26, 2014 Share Posted May 26, 2014 Change clan to money. Remove tostring from line 8. 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