mirror of
https://codeberg.org/usrib/emeraldbank.git
synced 2024-12-23 06:32:25 +01:00
sonido y mensaje a irc al usar /pay
This commit is contained in:
parent
4c634064e8
commit
3810b87430
@ -42,8 +42,17 @@ core.register_chatcommand("pay", {
|
||||
if bankemeralds1 >= num then
|
||||
core.chat_send_player(name, S("Pay Successfully! You have transferred @1 Emeralds." , num) )
|
||||
core.chat_send_player(playername2, S("Pay Successfully! You've gotten @1 Emeralds.", num) )
|
||||
if core.get_modpath("irc") then
|
||||
irc.saysec( S("@1 has transferred @2 emeralds to @3", playername, num, playername2) )
|
||||
end
|
||||
emeraldbank.add_emeralds(player1, -num)
|
||||
emeraldbank.add_emeralds(player2, num)
|
||||
core.sound_play("cash", {
|
||||
to_player = playername2,
|
||||
gain = 1.0,
|
||||
fade = 0.0,
|
||||
pitch = 1.0,
|
||||
})
|
||||
else
|
||||
core.chat_send_player(name, S("Not enough Emeralds in your account") )
|
||||
end
|
||||
|
7
init.lua
7
init.lua
@ -24,6 +24,13 @@ local modpath = core.get_modpath(core.get_current_modname())
|
||||
|
||||
emeraldbank = {}
|
||||
|
||||
-- compat with irc mod fork
|
||||
if core.get_modpath("irc") then
|
||||
if not irc.saysec then
|
||||
irc.saysec = irc.say
|
||||
end
|
||||
end
|
||||
|
||||
local income_enabled = core.settings:get_bool("emeraldbank.income_enabled", true)
|
||||
|
||||
if income_enabled then
|
||||
|
1
mod.conf
1
mod.conf
@ -1,3 +1,4 @@
|
||||
name = emeraldbank
|
||||
depends = mcl_core, mcl_sounds, mcl_inventory, mcl_formspec
|
||||
optional_depends = irc
|
||||
description = Keep your Emeralds in a bank
|
||||
|
Loading…
Reference in New Issue
Block a user