Raised This Month: $ Target: $400
 0% 

Add Frags and Deaths


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BrainDead
Junior Member
Join Date: Dec 2020
Location: Anywhere
Old 12-28-2020 , 17:05   Add Frags and Deaths
Reply With Quote #1

Can anyone add team scores, frags and deaths to be not reset too
PHP Code:
#include <amxmodx>

#define VERSION "0.0.3"
#define PLUGIN "No Timelimit Reset on Game Commencing"

new bool:g_bRestarting
new mp_timelimit

new g_iAlreadyCountedMins

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
register_event("TextMsg""Event_TextMsg_Restart""a""2&#Game_C""2&#Game_w");
    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0")

    
mp_timelimit get_cvar_pointer("mp_timelimit")
}

public 
Event_TextMsg_Restart()
{
    
g_bRestarting true
}

public 
Event_HLTV_New_Round()
{
    if( 
g_bRestarting )
    {
        
g_bRestarting false

        
new iOldTimelimit get_pcvar_num(mp_timelimit)
        if( !
iOldTimelimit )
        {
            return
        }

        new 
Float:flTimeLimit 60.0 iOldTimelimit

        flTimeLimit 
-= get_gametime() - 60.0 g_iAlreadyCountedMins
        
if( flTimeLimit 60.0 )
        {
            
set_pcvar_num(mp_timelimit1)
            
g_iAlreadyCountedMins += iOldTimelimit 1
        
}
        else
        {
            new 
iRounded floatround(flTimeLimit 60.0)
            
set_pcvar_num(mp_timelimitiRounded)
            
g_iAlreadyCountedMins += iOldTimelimit iRounded
        
}
    }

BrainDead is offline
AnimalMonster
Senior Member
Join Date: May 2020
Old 12-28-2020 , 18:00   Re: Add Frags and Deaths
Reply With Quote #2

Quote:
Originally Posted by BrainDead View Post
Can anyone add team scores, frags and deaths to be not reset too
PHP Code:
#include <amxmodx>

#define VERSION "0.0.3"
#define PLUGIN "No Timelimit Reset on Game Commencing"

new bool:g_bRestarting
new mp_timelimit

new g_iAlreadyCountedMins

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
register_event("TextMsg""Event_TextMsg_Restart""a""2&#Game_C""2&#Game_w");
    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0")

    
mp_timelimit get_cvar_pointer("mp_timelimit")
}

public 
Event_TextMsg_Restart()
{
    
g_bRestarting true
}

public 
Event_HLTV_New_Round()
{
    if( 
g_bRestarting )
    {
        
g_bRestarting false

        
new iOldTimelimit get_pcvar_num(mp_timelimit)
        if( !
iOldTimelimit )
        {
            return
        }

        new 
Float:flTimeLimit 60.0 iOldTimelimit

        flTimeLimit 
-= get_gametime() - 60.0 g_iAlreadyCountedMins
        
if( flTimeLimit 60.0 )
        {
            
set_pcvar_num(mp_timelimit1)
            
g_iAlreadyCountedMins += iOldTimelimit 1
        
}
        else
        {
            new 
iRounded floatround(flTimeLimit 60.0)
            
set_pcvar_num(mp_timelimitiRounded)
            
g_iAlreadyCountedMins += iOldTimelimit iRounded
        
}
    }

All i will tell you is that it is possible but you need some variables to stock the frags and deaths
AnimalMonster is offline
BrainDead
Junior Member
Join Date: Dec 2020
Location: Anywhere
Old 12-28-2020 , 18:34   Re: Add Frags and Deaths
Reply With Quote #3

Quote:
Originally Posted by AnimalMonster View Post
All i will tell you is that it is possible but you need some variables to stock the frags and deaths
Nvault?
BrainDead is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 12-28-2020 , 20:26   Re: Add Frags and Deaths
Reply With Quote #4

Quote:
Originally Posted by BrainDead View Post
Nvault?
No, not for this. Simply save all kills and deaths in variables, then catch game_commencing and set the kills & deaths again using those variables.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
BrainDead
Junior Member
Join Date: Dec 2020
Location: Anywhere
Old 12-29-2020 , 04:34   Re: Add Frags and Deaths
Reply With Quote #5

Quote:
Originally Posted by Napoleon_be View Post
No, not for this. Simply save all kills and deaths in variables, then catch game_commencing and set the kills & deaths again using those variables.
Yes, but i asking for help if anyone can remake that. I have no possability to write codes.
BrainDead is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-29-2020 , 07:13   Re: Add Frags and Deaths
Reply With Quote #6

If you're not willing to try yourself, you should post in the Requests section. This one is for help and learning.
If you want to try, post your attempt here and we will help you.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 14:12.


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