1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

HotBlock minus miney

Discussion in 'Plugin Help' started by WylSmart, Jul 5, 2020.

  1. WylSmart

    WylSmart Slime

    Messages:
    93
    I use the hot block plugin, I changed it a bit, how can I make money go to the player for entering a safe zone for a certain block?

    This code is responsible for the fact that when you stand on the block you are credited with money,
    PHP:
        private function payCoins(Player $pl): void {
            
    $pl->sendTip($this->hotBlock->getMessage("block.move"));
            
    $pl->sendTip(
                
    $this->hotBlock->getMessage(
                    
    "block.coins",
                    array(
    "count" => $this->hotBlock->getEconomy()->myMoney($pl))
                )
            );

            
    $this->hotBlock->getEconomy()->addMoney($pl0.50false"HotBlock");
        }
    }
    this function is responsible for the safe zone, when you bedrock a block through a hip, you need to deduct - money from the player?
    PHP:
                    case Block::BEDROCK:
                        
    $playerInLevel->sendTip($this->hotBlock->getMessage("ground.safe"));
                        break;
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.