local playermoney = getPlayerMoney(player)
Player in this case is the source that is executing it, so you.
If you want to set it to a player with an account that is currently logged in you should do that with a loop.
for k,v in pairs(getElementsByType("player")) do
if getAccountName(v) == AccName then -- This can cause problems if more players are on the same account, giving all of them money
givePlayerMoney(v, amount)
end
end