Raised This Month: $ Target: $400
 0% 

[HELP] Vampire of ConnorMcLeod.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
twiister
Senior Member
Join Date: Mar 2013
Location: Argentina
Old 02-26-2014 , 23:49   [HELP] Vampire of ConnorMcLeod.
Reply With Quote #1

Hello, I would like to eliminate the HUD that marks 0. Only to leave the hud of the Head.



PHP Code:
/*    Copyright © 2009, ConnorMcLeod

    Vampire is free software;
    you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Vampire; if not, write to the
    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
*/

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <screenfade_util>

#define PLUGIN "Vampire"
#define AUTHOR "ConnorMcLeod"
#define VERSION "1.2.0"

#define cs_get_user_team(%1)    get_pdata_int(%1,114)

const m_LastHitGroup 75

new g_iMaxPlayers

new g_pCvarHpBonusg_pCvarHpBonusHsg_pCvarMaxHealthg_pCvarColorg_pCvarColorHsg_pCvarFadeTime

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
g_pCvarHpBonus register_cvar("amx_vampire_hp""")
    
g_pCvarHpBonusHs register_cvar("amx_vampire_hp_hs""50")

    
g_pCvarMaxHealth register_cvar("amx_vampire_max_hp""100")
    
g_pCvarFadeTime register_cvar("amx_vampire_fadetime""0.3")

    
g_pCvarColor register_cvar("amx_vampire_color""000100255")
    
g_pCvarColorHs register_cvar("amx_vampire_color_hs""000255100")

    
RegisterHam(Ham_Killed"player""Player_Killed"1)

    
g_iMaxPlayers get_maxplayers()
}

public 
Player_Killed(iVictimiKiller)
{
    if(    
iVictim == iKiller
    
||    !( <= iKiller <= g_iMaxPlayers)
    ||    !
is_user_alive(iKiller)
    ||    
cs_get_user_team(iVictim) == cs_get_user_team(iKiller)    )
    {
        return
    }

    new 
Float:flHealthFloat:flMaxHealth get_pcvar_float(g_pCvarMaxHealth)
    
pev(iKillerpev_healthflHealth)
    new 
bHeadShot = (get_pdata_int(iVictimm_LastHitGroup) == HIT_HEAD)

    if( 
flHealth flMaxHealth )
    {
        new 
Float:flNewHealth
        
new Float:flBonus get_pcvar_float(bHeadShot g_pCvarHpBonusHs g_pCvarHpBonus)

        
flNewHealth floatmin(flHealth flBonusflMaxHealth)
        
set_pev(iKillerpev_healthflNewHealth)

        
set_hudmessage(0255100, -1.00.1501.01.00.10.1, -1)
        
show_hudmessage(iKiller"Healed +%.0f hp"flNewHealth flHealth)
    }

    new 
iColor[3], Float:flTime get_pcvar_float(g_pCvarFadeTime)
    
iColor get_color(bHeadShot g_pCvarColorHs g_pCvarColor)
    
UTIL_ScreenFade(iKilleriColorflTimeflTime75)
}

get_color(pcvar)
{
    new 
iColor[3], szColor[10]
    
get_pcvar_string(pcvarszColorcharsmax(szColor))
    new 
str_to_num(szColor)

    
iColor[Red] = 1000000
    c 
%= 1000000
    iColor
[Green] = 1000
    iColor
[Blue] = 1000

    
return iColor

Thank you very much!
twiister is offline
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 02-27-2014 , 09:02   Re: [HELP] Vampire of ConnorMcLeod.
Reply With Quote #2

PHP Code:
show_hudmessage(iKiller"Healed"
??

Last edited by Monster Truck; 02-27-2014 at 09:02.
Monster Truck is offline
twiister
Senior Member
Join Date: Mar 2013
Location: Argentina
Old 02-27-2014 , 09:41   Re: [HELP] Vampire of ConnorMcLeod.
Reply With Quote #3

Quote:
Originally Posted by Monster Truck View Post
PHP Code:
show_hudmessage(iKiller"Healed"
??
Only to leave the hud of the Head.


Last edited by twiister; 02-27-2014 at 09:56.
twiister is offline
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 02-27-2014 , 11:32   Re: [HELP] Vampire of ConnorMcLeod.
Reply With Quote #4

Ah readed healed ...
Monster Truck is offline
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 02-27-2014 , 11:39   Re: [HELP] Vampire of ConnorMcLeod.
Reply With Quote #5

dd

Last edited by Monster Truck; 02-27-2014 at 11:48. Reason: Delete
Monster Truck is offline
twiister
Senior Member
Join Date: Mar 2013
Location: Argentina
Old 02-27-2014 , 13:36   Re: [HELP] Vampire of ConnorMcLeod.
Reply With Quote #6

Quote:
Originally Posted by Monster Truck View Post
Ah readed healed ...
Yes, is it possible to do it?
twiister is offline
Old 03-02-2014, 13:13
twiister
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
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 10:40.


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