Character:takeMoney - brianhang/nutscript2 GitHub Wiki
Description
Character:takeMoney(amount)
This server function takes away the given amount to the character's money.
Parameters
| Name | Description |
|---|---|
amount |
The amount to take away. |
Side Effects
- The character's money is changed.
Errors
amountis not anumber
Example
-- Create a command that takes 50 away from the player's money.
concommand.Add("lessmoney", function(client, command, arguments)
if (client:getChar()) then
client:getChar():takeMoney(50)
end
end)