Raised This Month: $32 Target: $400
 8% 

Health++ HP Supremacy v1.0


Post New Thread Reply   
 
Thread Tools Display Modes
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 01-25-2022 , 16:45   Re: Health++ HP Supremacy v1.0
Reply With Quote #11

Wheres Roach with the ban hammer?!

https://forums.alliedmods.net/misc.php?do=showrules
Quote:
Do not blank out posts or threads. If you posted a question and later solve your problem, post the solution for others to find.
__________________

Last edited by DruGzOG; 01-25-2022 at 16:46.
DruGzOG is offline
Send a message via AIM to DruGzOG
iclassdon
AlliedModders Donor
Join Date: May 2006
Old 01-25-2022 , 16:49   Re: Health++ HP Supremacy v1.0
Reply With Quote #12

health_pp.sma
PHP Code:
/*
===========================================================================================================================================
C:\
=   Health++ HP Supremacy - AMX Mod X script. Copyright © 2022, WATCH_DOGS UNITED
=
=   Credits:
=
=   λMX Mod X             -  Plugin creation opportunity; © Copyright AMX Mod X Dev Team.
=   WATCH_DOGS UNITED     -  Plugin creation.
=   Kia Armani            -  Kills count.
=
=   Description:
=
=   Health++ allows you to control the starting health for both Ts and Cts.
=   In addition, you can increase players health according the number of kills and round wins.
=   Settings take effect on every round start.
=
=   Commands:
=
=   hpp_health_t          -  Starting health ( base ) for Terrorists.  Default: 100
=   hpp_health_ct         -  Starting health ( base ) for Counter-Terrorists.  Default: 100
=   hpp_incr_win_t        -  Health increased for Terrorists for every round win.  Default: 0
=   hpp_incr_win_ct       -  Health increased for Counter-Terrorists for every round win.  Default: 0
=   hpp_incr_kills_t      -  Health increased for a Terrorist for every player he killed.  Default: 0
=   hpp_incr_kills_ct     -  Health increased for a Counter-Terrorist for every player he killed.  Default: 0
===========================================================================================================================================
*/

    #include < amxmisc >
    #include < fun >

    #define num get_pcvar_num
    #define iPlayer iPlayers [ i ]
    #define T  get_user_team ( iPlayer ) == 1
    #define CT get_user_team ( iPlayer ) == 2

    
new P_Cvars ] , reset_count 33 ] = iPlayers 32 ] , iNum T_KS 33 ] = ,  CT_KS 33 ] = T_WIN_C CT_WIN_C 0;

public 
plugin_init()
{
    
register_plugin "Health++"  "1.0" "WATCH_DOGS UNITED"                             )
    
register_event  "ResetHUD"  "New_ResetHUD"       "be"                             )
    
register_event  "DeathMsg"  "Kills_Count"        ,  "a"                             )
    
register_event  "HLTV"      "Reset_Resets_Count" ,  "a" "1=0" "2=0"             )
    
register_event  "TextMsg"   "Reset_Kills_Count"  ,  "a" "2&#Game_C" "2&#Game_w" )
    
register_event  "SendAudio" "Ts_Win"             ,  "a" "2=%!MRAD_terwin"         )
    
register_event  "SendAudio" "Cts_Win"            ,  "a" "2=%!MRAD_ctwin"          )
    
P_Cvars ] = register_cvar "hpp_health_t"       "100"                            )
    
P_Cvars ] = register_cvar "hpp_health_ct"      "100"                            )
    
P_Cvars ] = register_cvar "hpp_incr_win_t"     ,   "0"                            )
    
P_Cvars ] = register_cvar "hpp_incr_win_ct"    ,   "0"                            )
    
P_Cvars ] = register_cvar "hpp_incr_kills_t"   ,   "0"                            )
    
P_Cvars ] = register_cvar "hpp_incr_kills_ct"  ,   "0"                            )
}

public 
plugin_cfg ( )

    
server_cmd "exec addons/amxmodx/configs/health_pp.cfg" )

public 
Reset_Resets_Count ( )

    for ( new 
iNum i++ )
        
reset_count iPlayer ] = 0

public Reset_Kills_Count ( )
{
    for ( new 
iNum i++ )
    {
        
T_KS    iPlayer ] = 0
        CT_KS   
iPlayer ] = 0
    
}
}

public 
New_ResetHUD ( )

    
set_task 0.0 "Starting_Health" )

public 
Starting_Health ( )
{
    
get_players iPlayers iNum "a" )
    for ( new 
iNum i++ )
    {
        
reset_count iPlayer ]++  // reset_count is a way to fix the ResetHUD event from sending a task multiple times at once.
        
if ( reset_count iPlayer ] < )
        {
            if ( 
)
                
set_user_health iPlayer num P_Cvars ] ) + num P_Cvars ] ) * T_WIN_C num P_Cvars ] ) * T_KS iPlayer ] )

            if ( 
CT )
                
set_user_health iPlayer num P_Cvars ] ) + num P_Cvars ] ) * CT_WIN_C num P_Cvars ] ) * CT_KS iPlayer ] )
        }
    }
}

public 
Ts_Win ( )

    
T_WIN_C++

public 
Cts_Win ( )

    
CT_WIN_C++

public 
Kills_Count ( )
{
    new 
Killer  read_data )
    if ( !
is_user_connected Killer ) )
        return

    
get_playersiPlayers iNum )
    for ( new 
iNum i++ )
    {
        if ( 
&& iPlayer == Killer )
            
T_KS iPlayer ]++

        if ( 
CT && iPlayer == Killer )
            
CT_KS iPlayer ]++
    }

health_pp.cfg
PHP Code:
==================================================================================================================
                                           
HEALTH++ - CONFIGEDITOR
==================================================================================================================
    
COMMANDS WILL ONLY BE LOADED BY THE GAME WHEN REMOVING THE BAR "/" IN THE LEFT SIDE OF THE COMMAND.
==================================================================================================================
    
MY CUSTOM CONFIGS  ||                             DESCRIPTION                                ||  DEFAULT VALUE
==================================================================================================================
/
hpp_health_t 100      ||  Starting health base ) for Terrorists.                              ||    100
------------------------------------------------------------------------------------------------------------------
/
hpp_health_ct 100     ||  Starting health base ) for Counter-Terrorists.                      ||    100
------------------------------------------------------------------------------------------------------------------
/
hpp_incr_win_t 0      ||  Health increased for Terrorists for every round win.                  ||      0
------------------------------------------------------------------------------------------------------------------
/
hpp_incr_win_ct 0     ||  Health increased for Counter-Terrorists for every round win.          ||      0
------------------------------------------------------------------------------------------------------------------
hpp_incr_kills_t 0    ||  Health increased for a Terrorist for every player he killed.          ||      0
------------------------------------------------------------------------------------------------------------------
hpp_incr_kills_ct 0   ||  Health increased for a Counter-Terrorist for every player he killed.  ||      0
================================================================================================================== 
iclassdon is offline
Send a message via MSN to iclassdon
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-26-2022 , 05:32   Re: Health++ HP Supremacy v1.0
Reply With Quote #13

Quote:
Originally Posted by OciXCrom View Post
I hate how I turned on my computer just to have a look at the code and it got deleted moments before I got my hands on it.

I have a more serious question though. Why are you referring to yourself in plural?

//Edit: I think they just rage-quit the entire website so I guess me'll never find out.
Asking the real questions here. You missed some gems like set_task with a delay of 0.0 seconds.
__________________
HamletEagle is offline
Old 01-26-2022, 18:57
DJEarthQuake
This message has been deleted by DJEarthQuake. Reason: Disregard
maikier22
BANNED
Join Date: May 2022
Old 05-20-2022 , 06:08   Re: Health++ HP Supremacy v1.0
Reply With Quote #14

Every change of day it will incrase it's morale by a bit. Also putting it in a stack with other tanks will average their morale like any other troop. If you have many tanks the morale loss is only for the first one, the other are still full health. Once the first one dies the next Kodi nox one will start at 100% morale (if this hasn't changed)

Last edited by maikier22; 05-20-2022 at 15:21.
maikier22 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 15:39.


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