Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/19/17 in all areas

  1. с начала javaScript, далее сам Mysql нужно изучить тебе, потом wiki rage. (которой пока не совсем готов.) Перейди сюда ps: слово "скриптер" здесь не уместна, тут программисты...
    2 points
  2. Похоже что в моем примере я зря постоянно завершал соединение. Нужно везде убрать connection.end();
    1 point
  3. "use strict" class Base { constructor(params) { params = params || Base.defaultParams this.name = params.name this.cost = params.cost this.type = params.type this.count = params.count this.use = this.bind (this.use, this.onUse) } bind () { return function (decorate, handler) { decorate.apply(this, [arguments, handler]) } } static control(instance) { if (instance.count <= 0) delete instance } use (player) { throw new Error("Method must be Implemented!") } onUse(player) { this.count-- console.log(`${player.name} только что съел ${this.name}`) Base.control(this) } } class Food extends Base { static get defaultParams() { return { name: "Pizza", cost: 12, type: "food", count: 1 } } use (args, callback) { let [player, ...values] = args if (player.hungry) { player.health = player.health + this.health >= 100 ? 100 : player.health + this.health callback(player) } } } let pizza = new Food(Food.defaultParams) pizza.use(player)
    1 point
  4. Держи - https://vk.com/ragemp?w=wall-121111933_7728
    1 point
×
×
  • Create New...