Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[ROZWIĄZANE] Plugin VAMPIRE (hp za fraga)


  • Zamknięty Temat jest zamknięty
7 odpowiedzi w tym temacie

#1 Filip1512

    Wszechmogący

  • Power User

Reputacja: 137
Zaawansowany

  • Postów:641
  • Steam:steam
  • Imię:Filip
  • Lokalizacja:Poland
Offline

Napisano 25.06.2012 18:54

Cześć:)
Mógłby to ktoś przerobić tak, żeby na ekranie nie było "fade", że gdy zabije w ciało kogoś, to daje mu 0hp?

/*
* 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>

new const PLUGIN_VERSION[] = "1.0d"

new health_add
new health_hs_add
new health_max

new gmsgScreenFade, g_maxplayers

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", "eDeathMsg", "a")

gmsgScreenFade = get_user_msgid("ScreenFade")
g_maxplayers = get_maxplayers()
}

public eDeathMsg() {
new KillerId = read_data(1)
new VictimId = read_data(2)
if(!KillerId || KillerId > g_maxplayers)
return

if(KillerId == VictimId || get_user_team(KillerId) == get_user_team(VictimId))
return

new KillerHealth = get_user_health(KillerId)
new NewKillerHealth = min( ( read_data(3) ?
get_pcvar_num(health_hs_add) :
get_pcvar_num(health_add) ) +
KillerHealth ,

get_pcvar_num(health_max) )

set_user_health(KillerId, NewKillerHealth)

// 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(KillerId, "Healed +%d hp", NewKillerHealth - KillerHealth)

// Screen fading
message_begin(MSG_ONE, gmsgScreenFade, _, KillerId)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
write_byte(0)
write_byte(0)
write_byte(200)
write_byte(75)
message_end()
}




Chodzi o to, że poszukiwałem pluginu, który daje hp za zabicie w głowę i przy okazji ma być fade, a za zabicie kogoś w klate jest fade, ale ustawiłem, żeby nie dawało hp, więc też nie chce tego fade jak hp nie dodaje.
Mam nadzieję, że w miare zrozumiale :)
  • +
  • -
  • 0
Filip / `NN
Wymuszanie rate'ów co spawna - update v2.1!

#2 Gość_21977_*

  • Gość

Reputacja: 0

Offline

Napisano 25.06.2012 19:05

/*	   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>

new const PLUGIN_VERSION[] = "1.0d"

new health_add
new health_hs_add
new health_max

new gmsgScreenFade, g_maxplayers

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", "eDeathMsg", "a")

gmsgScreenFade = get_user_msgid("ScreenFade")
g_maxplayers = get_maxplayers()
}

public eDeathMsg() {
new KillerId = read_data(1)
new VictimId = read_data(2)
if(!KillerId || KillerId > g_maxplayers)
return

if(KillerId == VictimId || get_user_team(KillerId) == get_user_team(VictimId))
return

new KillerHealth = get_user_health(KillerId)
new NewKillerHealth = min( ( read_data(3) ?
get_pcvar_num(health_hs_add) :
get_pcvar_num(health_add) ) +
KillerHealth ,

get_pcvar_num(health_max) )

set_user_health(KillerId, NewKillerHealth)

// 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(KillerId, "Healed +%d hp", NewKillerHealth - KillerHealth)

if(read_data(3)){
// Screen fading
message_begin(MSG_ONE, gmsgScreenFade, _, KillerId)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
write_byte(0)
write_byte(0)
write_byte(200)
write_byte(75)
message_end()
}
}


#3 Filip1512

    Wszechmogący

  • Autor tematu
  • Power User

Reputacja: 137
Zaawansowany

  • Postów:641
  • Steam:steam
  • Imię:Filip
  • Lokalizacja:Poland
Offline

Napisano 25.06.2012 19:11

+, mam nadzieję, że zadziała :) zaraz napiszę czy działa

Przy okazji - czemu na mapie fy_pool_day runda się restartuje po upływie limitu rundy (mp_roundtime)?
Serwer Team Deathmatch
  • +
  • -
  • 0
Filip / `NN
Wymuszanie rate'ów co spawna - update v2.1!

#4 Gość_21977_*

  • Gość

Reputacja: 0

Offline

Napisano 25.06.2012 19:21

Ponieważ Terroryści nie zdążyli podłożyć bomby w wyznaczonym czasie.

#5 Filip1512

    Wszechmogący

  • Autor tematu
  • Power User

Reputacja: 137
Zaawansowany

  • Postów:641
  • Steam:steam
  • Imię:Filip
  • Lokalizacja:Poland
Offline

Napisano 25.06.2012 19:21

Ponieważ Terroryści nie zdążyli podłożyć bomby w wyznaczonym czasie.



A można to jakoś ustawić? Bo na przykład na mapach de_ tak nie miałem, na cs_ nie sprawdzałem
  • +
  • -
  • 0
Filip / `NN
Wymuszanie rate'ów co spawna - update v2.1!

#6 Gość_21977_*

  • Gość

Reputacja: 0

Offline

Napisano 25.06.2012 19:25

Od tego są odpowiednie pluginy, ale kończmy ten offtopic.

#7 Filip1512

    Wszechmogący

  • Autor tematu
  • Power User

Reputacja: 137
Zaawansowany

  • Postów:641
  • Steam:steam
  • Imię:Filip
  • Lokalizacja:Poland
Offline

Napisano 25.06.2012 19:52

Działa, dzięki, close
  • +
  • -
  • 0
Filip / `NN
Wymuszanie rate'ów co spawna - update v2.1!

#8 Gość_21977_*

  • Gość

Reputacja: 0

Offline

Napisano 25.06.2012 20:09

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Pomoc udzielona

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych