Преработка на Vampire плъгин

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
MF1
Извън линия
Потребител
Потребител
Мнения: 316
Регистриран на: 12 Окт 2016, 21:15
Местоположение: гр.Варна
Получена благодарност: 12 пъти
Обратна връзка:

Преработка на Vampire плъгин

Мнение от MF1 » 18 Дек 2016, 15:19

Здравейте,
ако може някой да ми редактира ето този плъгин:
viewtopic.php?f=21&t=284
Искам да дава само hp според квара, всякакви други fade и тем подобни да се махнат, благодаря много :)
ето sma:

Код за потвърждение: Избери целия код

/*
*   http://games.qwerty.ru
*
*	AmxModX
*   Vampire plugin
*    by Shalfey
*
*   CVars
*   amx_vampire_hp - hp add for kill
*   amx_vampire_hp_hs - hp add for kill in head
*   amx_vampire_max_hp - max player hp
*
*   Players gets HP for kills.
*/
#include <amxmodx>
#include <fun>

#define PLUGIN_VERSION "1.0c"

new health_add
new health_hs_add
new health_max

new nKiller
new nKiller_hp
new nHp_add
new nHp_max

public plugin_init()
{
   register_plugin("Vampire", PLUGIN_VERSION, "Shalfey")

   health_add = register_cvar("amx_vampire_hp", "15")
   health_hs_add = register_cvar("amx_vampire_hp_hs", "40")
   health_max = register_cvar("amx_vampire_max_hp", "100")

   register_event("DeathMsg", "hook_death", "a", "1>0") 	
}

public hook_death()
{
   // Killer id
   nKiller = read_data(1)

   if ( (read_data(3) == 1) && (read_data(5) == 0) )
   {
      nHp_add = get_pcvar_num (health_hs_add)
   }
   else
      nHp_add = get_pcvar_num (health_add)

   nHp_max = get_pcvar_num (health_max)

   // Updating Killer HP
   nKiller_hp = get_user_health(nKiller)
   nKiller_hp += nHp_add

   // Maximum HP check
   if (nKiller_hp > nHp_max) nKiller_hp = nHp_max

   set_user_health(nKiller, nKiller_hp)

   // Hud message "Healed +15/+40 hp"
   set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
   show_hudmessage(nKiller, "Healed +%d hp", nHp_add)

   // Screen fading
   message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)
   write_short(1<<10)
   write_short(1<<10)
   write_short(0x0000)
   write_byte(random(256))
   write_byte(random(256))
   write_byte(random(256))
   write_byte(75)
   message_end()
   
} 
Join now.
www.MF1-CS.eu ---------------------------- 91.132.63.55:27015 91.132.63.56:27015 ---------------------------- :bg:

Аватар
OciXCrom
Извън линия
Администратор
Администратор
Мнения: 7206
Регистриран на: 06 Окт 2016, 19:20
Местоположение: /resetscore
Се отблагодари: 117 пъти
Получена благодарност: 1295 пъти
Обратна връзка:

Re: Преработка на Vampire плъгин

Мнение от OciXCrom » 18 Дек 2016, 16:46

Код за потвърждение: Избери целия код

#include <amxmodx>
#include <fun>

#define PLUGIN_VERSION "1.0c"

new health_add
new health_hs_add
new health_max

new nKiller
new nKiller_hp
new nHp_add
new nHp_max

public plugin_init()
{
   register_plugin("Vampire", PLUGIN_VERSION, "Shalfey")

   health_add = register_cvar("amx_vampire_hp", "15")
   health_hs_add = register_cvar("amx_vampire_hp_hs", "40")
   health_max = register_cvar("amx_vampire_max_hp", "100")

   register_event("DeathMsg", "hook_death", "a", "1>0")    
}

public hook_death()
{
   // Killer id
   nKiller = read_data(1)

   if ( (read_data(3) == 1) && (read_data(5) == 0) )
   {
      nHp_add = get_pcvar_num (health_hs_add)
   }
   else
      nHp_add = get_pcvar_num (health_add)

   nHp_max = get_pcvar_num (health_max)

   // Updating Killer HP
   nKiller_hp = get_user_health(nKiller)
   nKiller_hp += nHp_add

   // Maximum HP check
   if (nKiller_hp > nHp_max) nKiller_hp = nHp_max

   set_user_health(nKiller, nKiller_hp)
} 

Аватар
MF1
Извън линия
Потребител
Потребител
Мнения: 316
Регистриран на: 12 Окт 2016, 21:15
Местоположение: гр.Варна
Получена благодарност: 12 пъти
Обратна връзка:

Re: Преработка на Vampire плъгин

Мнение от MF1 » 19 Дек 2016, 07:59

Благодаря много, лок :)
Join now.
www.MF1-CS.eu ---------------------------- 91.132.63.55:27015 91.132.63.56:27015 ---------------------------- :bg:

Заключено
  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 14 госта