ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. takePlayerMoney

Function

takePlayerMoney

ServerPlayersIdentical to MTA:SA

Takes money from the player.

Syntax

bool takePlayerMoney(player thePlayer, int amount)

Arguments

thePlayerplayer
The player.
amountint
The amount.

Returns

true on success.

Example

addEventHandler("onPlayerWasted", root, function()
    takePlayerMoney(source, math.min(100, getPlayerMoney(source)))
end)