DarkRP.Player.AddMoney

From Official DarkRP Wiki
Jump to navigation Jump to search
This page refers to DarkRP 2.4.3. This information may be incorrect as of later versions.
Check here for a up-to-date list of functions.
Function
Function name Player:AddMoney(number amount)
Description:
Adds a certain amount of money to the players supply. Negative values take money.
Returns: nil
Part of Library: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=DarkRP.Player.AddMoney]Player:AddMoney[/url][/b]

Examples

DescriptionAdd some cash to the players balance
Used onNewerServer.png
Code
function AddSomeCash( ply )
	ply:AddMoney(100)
end
OutputN/A


DescriptionTake away some cash from the players balance
Used onNewerServer.png
Code
function TakeCash( ply, amount )
	ply:AddMoney(-amount)
end
OutputN/A


Additional Notes

  • The function is serverside. The changes will automatically be sent to the client.