Difference between revisions of "LUA:RemoveCoin"
(Created page with "{{PageHeaderChild|LUA|RemoveCoin}} = LUA Functions: RemoveCoin() = Removes coin from the player ==== Syntax ==== var = RemoveCoin(param1, param2) ==== Parameters ==== ; Requ...") |
(No difference)
|
Latest revision as of 17:08, 9 August 2016
LUA - RemoveCoin
Return to: LUA | Tutorials | Portal | Forum | Project Manager | Bug Tracker
LUA Functions: RemoveCoin()
Removes coin from the player
Syntax
var = RemoveCoin(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (int32)
- param1 is the player we want to remove coin from
- param2 is the amount of coins to remove
Returns
- bool
- True if the coin was successfully removed
Usage
function hailed(NPC, Spawn)
if IsPlayer(Spawn) and RemoveCoin(Spawn, 10) then
Say(NPC, "I just took 10 copper from you!")
end
end
When the NPC is hailed the player will loose 10 copper
Notes
Can only be use on a player.