Raised This Month: $51 Target: $400
 12% 

HP On Kill


Post New Thread Reply   
 
Thread Tools Display Modes
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-11-2013 , 22:12   Re: HP on Kill (v1.5.5)
Reply With Quote #41

Updated To Version 1.5.5
Added ScreenFade Effects

Also Need Someone To Re Edit ML for Russian As Ive Added New Lines To hp_on_kill.txt Thanks.
__________________
Blizzard_87 is offline
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-13-2013 , 12:13   Re: HP on Kill (v1.5.5)
Reply With Quote #42

Code:
[ru]
HK_HS_MSG_PREFIX = %s Вы получили !g %i!n HP за убийство !g%s в Голову
HK_HS_MSG = !nВы получили!g %i!n HP за убийство !g%s в Голову
HK_KILL_MSG_PREFIX = %s Вы получили!g %i!n HP за убийство !g%s
HK_KILL_MSG = !nВы получили!g %i!n HP за убийство !g%s
HK_KILL_ANNOUCE_CONSOLE = [%s] Объявление Сообщений о Убийствах %s
HK_KILL_ANNOUCE_PREFIX = %s Объявление Сообщений о Убийствах !g%s
HK_KILL_ANNOUCE = !nОбъявление Сообщений о Убийствах !g%s
HK_HUD_MSG_OFF_PREFIX = %s Сообщение о HP в HUD !gВЫКЛ
HK_HUD_MSG_OFF = !nСообщение о HP в HUD !gВЫКЛ
HK_HUD_MSG_ON_PREFIX = %s Сообщение о HP в HUD !gВКЛ
HK_HUD_MSG_ON = !nСообщение о HP в HUD !gВКЛ
HK_HUD_EFFECT_CONSOLE = [%s] Hud Эффект %s
HK_HUD_EFFECT_PREFIX = %s Hud Эффект !g%s
HK_HUD_EFFECT = !nHud Эффект !g%s
HK_ON = ВКЛ.
HK_OFF = ВЫКЛ.
HK_SF_DEATH_PREFIX = Эффект затухания экрана после сметри !g%s
HK_SF_DEATH = Эффект затухания экрана после сметри !g%s
HK_SF_HEALTH_PREFIX = Эффект затухания экрана после убийства !g%s
HK_SF_HEALTH = Эффект затухания экрана после убийства !g%s
should be saved in UTF-8 (without BOM)
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-13-2013 , 18:18   Re: HP on Kill (v1.5.5)
Reply With Quote #43

Uploaded ScreenFade Include

sorry for forgetting this earlier
__________________
Blizzard_87 is offline
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-14-2013 , 02:23   Re: HP on Kill (v1.5.5)
Reply With Quote #44

works fine, thank you so much ^^
p.s. that was pretty quick
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
manu120
New Member
Join Date: Sep 2010
Old 04-14-2013 , 17:23   Re: HP on Kill (v1.5.5)
Reply With Quote #45

Hi, nj, will be possible to add a message that says how much hp had your killer before to kill you? Something like "Guy1 had X hp." The command /hp show (in my server at least) the restored hp's killer (100) and not show how much he had.

I think this will be so cool with cvars to controle how this message will appear (hud, text, both, off) and where will do it. In addition, if another player inflicts 50 or more damage to a victim (may be controled by cvar too) will get also this message (for kill assist and pretty combination with http://forums.alliedmods.net/showthread.php?t=91360).

Last edited by manu120; 04-14-2013 at 17:27.
manu120 is offline
bael
Junior Member
Join Date: Oct 2012
Old 04-24-2013 , 19:05   Re: HP on Kill (v1.5.5)
Reply With Quote #46

PHP Code:
set_user_health(iKillerhp bonusHP);
            
hp get_user_health(iKiller);
if(
hp maxhp)
{
    
set_user_health(iKillermaxhp);

first check what is max and then set hp
bael is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-24-2013 , 19:13   Re: HP on Kill (v1.5.5)
Reply With Quote #47

Quote:
Originally Posted by bael View Post
PHP Code:
set_user_health(iKillerhp bonusHP);
            
hp get_user_health(iKiller);
if(
hp maxhp)
{
    
set_user_health(iKillermaxhp);

first check what is max and then set hp
there is a first check for if player already has the max hp amount

Code:
    if(iKiller && iVictim != iKiller)     {         new maxhp = get_pcvar_num(p_MaxHp);         new hp = get_user_health(iKiller);                 if(hp != maxhp)         {

then that other check is after they receive there bonus hp to make sure there hp does not go over the max amount.

so it is required.

please explain why you think its wrong?
__________________
Blizzard_87 is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-24-2013 , 19:16   Re: HP on Kill (v1.5.5)
Reply With Quote #48

Quote:
Originally Posted by manu120 View Post
Hi, nj, will be possible to add a message that says how much hp had your killer before to kill you? Something like "Guy1 had X hp." The command /hp show (in my server at least) the restored hp's killer (100) and not show how much he had.

I think this will be so cool with cvars to controle how this message will appear (hud, text, both, off) and where will do it. In addition, if another player inflicts 50 or more damage to a victim (may be controled by cvar too) will get also this message (for kill assist and pretty combination with http://forums.alliedmods.net/showthread.php?t=91360).
not needed my plugin does exactly what it says it does.
__________________
Blizzard_87 is offline
bael
Junior Member
Join Date: Oct 2012
Old 04-24-2013 , 19:23   Re: HP on Kill (v1.5.5)
Reply With Quote #49

You need to check if hp + bonusHP > maxhp and then according to that set player hp. Besacuse in your way first you set hp, then use native to read that same hp and then compare to max.
bael is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-24-2013 , 20:18   Re: HP on Kill (v1.5.5)
Reply With Quote #50

Quote:
Originally Posted by bael View Post
PHP Code:
set_user_health(iKillerhp bonusHP);
            
hp get_user_health(iKiller);
if(
hp maxhp)
{
    
set_user_health(iKillermaxhp);

first check what is max and then set hp
edited.

Code:
if(hp + bonusHP > maxhp)                 set_user_health(iKiller, maxhp);             else                                set_user_health(iKiller, hp + bonusHP);

Updated Plugin In Main Post.
__________________
Blizzard_87 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode