No categories assigned
LUA:RemoveCoin
- Last edited 9 years ago by I need to Update My Profile
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.