 |
|
Senior Member
|

12-28-2020
, 18:00
Re: Add Frags and Deaths
|
#2
|
Quote:
Originally Posted by BrainDead
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(PLUGIN, VERSION, "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_timelimit, 1)
g_iAlreadyCountedMins += iOldTimelimit - 1
}
else
{
new iRounded = floatround(flTimeLimit / 60.0)
set_pcvar_num(mp_timelimit, iRounded)
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
|
|
|
|