RU/GivePlayerMoney: Difference between revisions
Jump to navigation
Jump to search
Ch3reshnya (talk | contribs) (Created page with "__NOTOC__ {{Shared function}} {{New items|3.0140|1.4| Эта функция забирает у игрока деньги. }} == Heading text == <syntaxhighlight lang="l...") |
Ch3reshnya (talk | contribs) |
||
Line 6: | Line 6: | ||
== Heading text == | == Heading text == | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool | bool takePlayerMoney( player player, var amount ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 14:37, 26 November 2020
Эта функция забирает у игрока деньги.
Heading text
bool takePlayerMoney( player player, var amount )
Required Arguments
- player: Игрок у которого забирать деньги.
- amount: Количество денег.
Returns
Выдает деньги игроку и возвращает true, false если деньги не были выданы.
Example
Click to collapse [-]
ClientВ этом примере мы забираем 500 долларов при команде take.
function takeMoney () takePlayerMoney(500) end addCommandHandler("take", takeMoney)
Click to collapse [-]
ServerЗдесь при наступлении на маркер забираем 500 рублей.
local marker = createMarker(0, 0, 0, "cylinder", 1.5, 255, 255, 0, 180) function isMarkerTakeMoney(hitElement) if hitElement == player then -- если тот кто зашел на маркер игрок то... takePlayerMoney(player, 500) -- забираем 500 долларов end end addEventHandler("onMarkerHit", marker, isMarkerTakeMoney)
See Also
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState