Иконка ресурса

FrozDark

Участник
Сообщения
1,769
Реакции
2,050
  • Автор ресурса
  • #1
Lasermines
Версия:
1.4.3

Описание: Добавляет в игру лазерные мины

Требуется:
SDKHooks 2.0+

240_screenshots_2011-12-13_00001.jpg

240_screenshots_2011-12-13_00003.jpg

Настройки (Cvars):
zr_lasermines_enable - Выключатель плагина
zr_lasermines_amount - Какое количество мин давать при каждом возрождении (только если режим покупки выключен) (-1 = Бесконечные мины)
zr_lasermines_maxamount - Какое максимальное количество мин игрок может носить. (0-Нет лимита)
zr_lasermines_damage - Урон от лазера
zr_lasermines_explode_damage - Урон от взрыва
zr_lasermines_explode_radius - Радиус взрыва
zr_lasermines_health - Количество здоровья мины. 0 = бессмертный
zr_lasermines_activatetime - Задержка перед активации мины
zr_lasermines_buymode - Включает режим покупки. В этом режиме вам придется покупать лазерные мины
zr_lasermines_buyzone - Нужно ли стоять в зоне покупки для покупки лазерных мин
zr_lasermines_price - Цена лазерной мины
zr_lasermines_color - Цвет лазера. Устанавливать как RGB
zr_lasermines_allow_pickup - Разрешить подбор установленных мин
zr_lasermines_allow_friendly_pickup - Разрешить союзникам подбирать ваши мины

Консольные команды:
sm_buylm <кол-во или ничего> - Чтобы купить мину
sm_blm <кол-во или ничего> - Чтобы купить мину
sm_bm <кол-во или ничего> - Чтобы купить мину
sm_plantlm - Чтобы установить мину
sm_plm - Чтобы установить мину
sm_lm - Чтобы установить мину

Для скриптеров:
PHP:
/**
 * Adds one or more remaining laser mines to the player
 *
 * @param client     Client index to add to
 * @param amount    Amount of laser mines to add.
 * @param uselimit  Set to true to use the plugin limitation, false to ignore
 * @return            New amount of laser mines. 0 if no lasermines added and -1 if the player has unlimited lasermines
 */
native ZR_AddClientLasermines(client, amount = 1, bool:uselimit = true);

/**
 * Sets the player's amount of the remaining laser mines
 *
 * @param client     Client index to set to
 * @param amount    Amount of laser mines to set. Negative numbers to set to infinity, 0 - to remove all and positive number to set to the amount
 * @param uselimit  Set to true to use the plugin limitation, false to ignore
 * @return            true on success, false otherwise
 */
native bool:ZR_SetClientLasermines(client, amount, bool:uselimit = true);

/**
 * Subtracts one or more remaining lasermines from the player
 *
 * @param client     Client index to substract from
 * @param amount    Amount of laser mines to substract.
 * @return            new amount of laser mines
 */
native ZR_SubClientLasermines(client, amount = 1);

/**
 * Returns number of remaining laser mines a player has.
 *
 * @param client     Client index to get from
 * @return            number of remaining laser mines.
 */
native ZR_GetClientLasermines(client);

/**
 * Foces a player to plant laser mine without substracting his amount. Does not call ZR_OnPlantLasermine
 *
 * @param client             Client index to force to
 * @param activation_delay    The activation time
 * @param explosion_damage    Explosion damage
 * @param explosion_radius     Explosion radius
 * @param health             The laser mine's health. 0 = Unbreakable
 * @param color             The laser mine's color.
 * @return            true on success, false otherwise
 */
native bool:ZR_PlantClientLasermine(client, Float:activation_delay = 2.0, explosion_damage = 100, explosion_radius = 300, health = 0, color[3] = {255, 255, 255});

/**
 * Clears the map from the player's laser mines
 *
 * @param client     Client index to clear
 * @noreturn
 */
native ZR_ClearMapClientLasermines(client);

/**
 * Checks whether the entity is a lasermine
 *
 * @param entity     Entity index to check
 * @return            True if the entity is a lasermine, false otherwise
 */
native bool:ZR_IsEntityLasermine(entity);

/**
 * Gets client index by the lasermine
 *
 * @param client     Entity index to get the owner for
 * @return            Client index or -1 if no client found
 */
native ZR_GetClientByLasermine(entity);

/**
 * Sets client max amount of lasermines
 *
 * @param client     Client index to set for
 * @param amount     The max amount to set
 * @noreturn
 */
native ZR_SetClientMaxLasermines(client, amount);

/**
 * Gets beam index by the lasermine
 *
 * @param client     The lasermine index to get the beam for
 * @return            Beam index or -1 if no beam found
 */
native ZR_GetBeamByLasermine(entity);

/**
 * Gets lasermine index by the beam
 *
 * @param client     The beam index to get the lasermine for
 * @return            Lasermine index or -1 if no lasermine found
 */
native ZR_GetLasermineByBeam(entity);

/**
 * Called when the player is about to buy a laser mine
 *
 * @param client     Client index of the player who is buying a laser mine
 * @param amount     The amount of laser mines a player is going to buy. Set by reference
 * @param price     The laser mine price. Set by reference
 * @return         Plugin_Changed to apply new values, Plugin_Contninue to allow buy as is and >= Plugin_Handled to block the operation
 */
forward Action:ZR_OnPreBuyLasermine(client, &amount, &price);


/**
 * Called when a player has bought a laser mine
 *
 * @param victim     Client index of the player who has bought
 * @param amount     The amount of laser mines have been bought
 * @param amount     The sum of money the player cost
 * @noreturn
 */
forward ZR_OnPostBuyLasermine(client, amount, sum);

/**
 * Called when the player is about to plant a laser mine
 *
 * @param client             Client index of the player
 * @param act_delay         Activation time. Set by reference
 * @param explosion_damage    Explosion damage. Set by reference
 * @param explosion_radius     Explosion radius. Set by reference
 * @param health            The laser mine's health. Set by reference
 * @param color[3]            The laser mine's color. Set by reference
 * @return         Plugin_Changed to apply new values, Plugin_Contninue to allow the planting as is and >= Plugin_Handled to block the planting
 */
forward Action:ZR_OnPlantLasermine(client, &Float:act_delay, &exp_damage, &exp_radius, &health, color[3]);

/**
 * Called when the player planted a laser mine
 *
 * @param act_delay         Activation time
 * @param lasermine         The lasermine index
 * @param explosion_damage    Explosion damage
 * @param explosion_radius     Explosion radius
 * @param health            The laser mine's health
 * @param color[3]            The laser mine's color
 * @noreturn
 */
forward ZR_OnLaserminePlanted(client, lasermine, Float:act_delay, exp_damage, exp_radius, health, color[3]);

/**
 * Called when the player is about to be hitted by a laser mine
 *
 * @param victim         Client index of the player who is being hitted
 * @param attacker         The owner index of the laser mine. Set by reference
 * @param beam             The beam index which is going to inflict the victim. Set by reference
 * @param lasermine     The lasermine index which is going to inflict the victim. Set by reference
 * @param damage         Damage of the hit. Set by reference
 * @return         Plugin_Changed to apply new values, Plugin_Contninue to allow the hit as is and >= Plugin_Handled to block the hit
 */
forward Action:ZR_OnPreHitByLasermine(victim, &attacker, &beam, &lasermine, &damage);


/**
 * Called when the player has been hitted by a laser mine
 *
 * @param victim         Client index of the player who has been hitted
 * @param attacker         The owner index of the laser mine
 * @param beam             The beam index which has inflicted the victim
 * @param lasermine     The lasermine index which has inflicted the victim
 * @param damage         Damage of the hit
 * @noreturn
 */
forward ZR_OnPostHitByLasermine(victim, attacker, beam, lasermine, damage);

/**
 * Called when the player is about to pickup a lasermine
 *
 * @param client         Client index of the player who is going to pickup
 * @param lasermine     Lasermine index which is being picked up
 * @param owner         The lasermine's owner index.
 * @return          Plugin_Contninue or Plugin_Changed to allow the pickup and Plugin_Handled or Plugin_Stop to block the pickup
 */
forward Action:ZR_OnPrePickupLasermine(client, lasermine, owner);


/**
 * Called when the player has picked up a lasermine
 *
 * @param client         Client index of the player who has picked up a lasermine
 * @param lasermine     Lasermine index which was picked up
 * @param owner         The lasermine's owner index
 * @noeturn
 */
forward ZR_OnPostPickupLasermine(client, lasermine, owner);

Инструкция по установке:
Скачайте архив и распакуйте в папку sourcemod
Скачайте zr_lasermines.txt и положите его в папку sourcemod/translations

Оригинал
 

Вложения

  • zr_lasermines.txt
    3.4 КБ · Просмотры: 1,214
  • zr_lasermines.zip
    69.3 КБ · Просмотры: 1,319
Последнее редактирование модератором:

.330d

Участник
Сообщения
257
Реакции
71
Re: [ZR] Lasermines 1.3

FrozDark, тут нету бага с физикой?
 

Dimonolog2008

Участник
Сообщения
98
Реакции
14
Re: [ZR] Lasermines 1.3

Плагин потестил, работает на ура, вот если бы добавили жизнь лазеру чтоб не бесконечно светил, то было бы вообще улетно. Я ставил 5 хп урона, пока зомби в нычке весь туннель пройдет уже труп. Вот в чем беда лазера, а так +100 тебе.
 
Последнее редактирование:

DENZEL519

Работаю с AI !
Сообщения
417
Реакции
198
Re: [ZR] Lasermines 1.3

Менял значения Cvars компилировал, и всё равно не пашет.
 

FrozDark

Участник
Сообщения
1,769
Реакции
2,050
  • Автор ресурса
  • #8
Re: [ZR] Lasermines 1.3

дополнительный плагин (имеется ввиду, не удалять оригинальный плагин)
 

Вложения

  • zr_lasermines_standable.smx
    2.1 КБ · Просмотры: 212

igroman

Участник
Сообщения
11
Реакции
0
Re: [ZR] Lasermines 1.3

дополнительный плагин (имеется ввиду, не удалять оригинальный плагин)
что он делает? это типо можно на них стоять?

и еще вопрос.
в ZR есть отталкивание (knockback) оно работает и на мины, т.е. при касании луча зомбаком, его отталкивает, как можно убрать отталкивание только у мин?
 

igroman

Участник
Сообщения
11
Реакции
0
Re: [ZR] Lasermines 1.3

есть еще один баг
мину можно разрушить нажатием на E, даже сквозь стену
 

Alcone

optizone.ru
Сообщения
318
Реакции
73
Re: [ZR] Lasermines 1.3

Нужен таймер для лазера что бы луч работал N -количество мин/сек
 

alex83alex

Участник
Сообщения
158
Реакции
34
Re: [ZR] Lasermines 1.3

если возможность сделать в насстройку cvar что бы был выбор какой команде разрешить устанавливать мины?
 

Alcone

optizone.ru
Сообщения
318
Реакции
73
Re: [ZR] Lasermines 1.3

если возможность сделать в насстройку cvar что бы был выбор какой команде разрешить устанавливать мины?

плагин разрешает ставить только человеку, когда он становиться зомби его мины исчезают.
 

Alcone

optizone.ru
Сообщения
318
Реакции
73
Re: [ZR] Lasermines 1.4

Модули:

Lasermines Battery
Для работы требуется версия основного плагина 1.4
Плагин добавляет батарейку для мины что дает лимит работы лазера в секундах.

lasermine_battery_charge - лимит работы лазера в секундах

http://forums.alliedmods.net/showpost.php?p=1645904&postcount=87

Lasermines admin amount
Для работы требуется версия основного плагина 1.4
Плагин дает админам мины, возможность закрепления по флагу.

lasermines_admin_amount - количество мин для админов
lasermines_admin_flag - флаг админа, оставьте пустым для всех админов.

http://forums.alliedmods.net/showpost.php?p=1645910&postcount=88

 

Вложения

  • lasermines_battery.smx
    6.5 КБ · Просмотры: 126
  • lasermines_admin.smx
    3.5 КБ · Просмотры: 123
Последнее редактирование:

FrozDark

Участник
Сообщения
1,769
Реакции
2,050
  • Автор ресурса
  • #17
Re: [ZR] Lasermines 1.4.2

а этот проверьте
 

Вложения

  • zr_lasermines.smx
    20.2 КБ · Просмотры: 92

FrozDark

Участник
Сообщения
1,769
Реакции
2,050
  • Автор ресурса
  • #19
Re: [ZR] Lasermines 1.4.2

Теперь исправил в 1 посте
 

Alcone

optizone.ru
Сообщения
318
Реакции
73
Re: [ZR] Lasermines 1.4.2

Все отлично работает :)
 
Сверху Снизу