#region FONCTION_InfectedRestarter
//--------------------------------------------------------------------------------------
#region Declaration et variable
private static IntPtr Client_Team_Indice_Base = (IntPtr)0x01AC1C24;//Hex:0x38A4 Decimal:14500
private static IntPtr Client_ConnectionStates__Base = (IntPtr)0x04973008;//Hex:0x78688 Decimal:493192
static bool LoadFastRestart;
bool InfectDetect = false;//Bool true,false
bool ActiveFonctions1;//Bool true,false
bool ActiveFonctions2;//Bool true,false
int TempMesg = 5000;
int InfecOut = 0;
int C_InfecR_Corection;
#endregion
public void InfecLoadSetting()
{
LoadFastRestart = true;
InfectDetect = false;
ActiveFonctions1 = false;
ActiveFonctions2 = false;
TempMesg = 5000;
InfecOut = 0;
}
public unsafe void InfectedRestarter()
{
for (int TrackClientTeam = 0; TrackClientTeam < 18; TrackClientTeam++)
{
String DVg_gametype = GetDvar("g_gametype");
C_InfecR_Corection = TrackClientTeam + 1;
//--------------------------------------------------------------------------------------
#region Axis
if (*((int*)(Client_Team_Indice_Base.ToInt32() + 0x38A4 * C_InfecR_Corection)) == 1)
{
if (ActiveFonctions1 == true)
{
InfecOut = 0;
ActiveFonctions2 = true;
}
}
#endregion
//--------------------------------------------------------------------------------------
#region FFA
if (*((int*)(Client_Team_Indice_Base.ToInt32() + 0x38A4 * C_InfecR_Corection)) == 0 && *((int*)(Client_ConnectionStates__Base.ToInt32() + 0x78688 * C_InfecR_Corection)) == 1)
{
if (ActiveFonctions2 == true)
{
InfecOut++;
if (InfecOut > 2)
{
InfectDetect = true;
}
}
}
#endregion
//--------------------------------------------------------------------------------------
#region Allies
if (*((int*)(Client_Team_Indice_Base.ToInt32() + 0x38A4 * C_InfecR_Corection)) == 2
)
{
if (DVg_gametype == "infect")
{
ActiveFonctions1 = true;
}
}
#endregion
//--------------------------------------------------------------------------------------
#region FONCTION InfectDetect
if (InfectDetect == true)
{
if (LoadFastRestart == true)
{
if (TempMesg > 0)
{
if (TempMesg == 5000) iPrintLnBold("^2INFECTED^7 has left, Server will fast_restart in " + TempMesg / 1000, null);
if (TempMesg == 4000) iPrintLnBold("^2INFECTED^7 has left, Server will fast_restart in " + TempMesg / 1000, null);
if (TempMesg == 3000) iPrintLnBold("^2INFECTED^7 has left, Server will fast_restart in " + TempMesg / 1000, null);
if (TempMesg == 2000) iPrintLnBold("^2INFECTED^7 has left, Server will fast_restart in " + TempMesg / 1000, null);
if (TempMesg == 1000) iPrintLnBold("^2INFECTED^7 has left, Server will fast_restart in " + TempMesg / 1000, null);
if (TempMesg == 1)
{
TempMesg = 5000;
LoadFastRestart = false;
ServerPrint("INFECTED has left, Server will fast restart!");
ServerLog(LogType.LogConsole, "INFECTED has left, Server will fast restart!");
ServerCommand("map_restart");
}
TempMesg--;
}
}
}
#endregion
//--------------------------------------------------------------------------------------
}
}
//--------------------------------------------------------------------------------------
#endregion
//--------------------------------------------------------------------------------------
#region Declaration et variable
private static IntPtr Client_Team_Indice_Base = (IntPtr)0x01AC1C24;//Hex:0x38A4 Decimal:14500
private static IntPtr Client_ConnectionStates__Base = (IntPtr)0x04973008;//Hex:0x78688 Decimal:493192
static bool LoadFastRestart;
bool InfectDetect = false;//Bool true,false
bool ActiveFonctions1;//Bool true,false
bool ActiveFonctions2;//Bool true,false
int TempMesg = 5000;
int InfecOut = 0;
int C_InfecR_Corection;
#endregion
public void InfecLoadSetting()
{
LoadFastRestart = true;
InfectDetect = false;
ActiveFonctions1 = false;
ActiveFonctions2 = false;
TempMesg = 5000;
InfecOut = 0;
}
public unsafe void InfectedRestarter()
{
for (int TrackClientTeam = 0; TrackClientTeam < 18; TrackClientTeam++)
{
String DVg_gametype = GetDvar("g_gametype");
C_InfecR_Corection = TrackClientTeam + 1;
//--------------------------------------------------------------------------------------
#region Axis
if (*((int*)(Client_Team_Indice_Base.ToInt32() + 0x38A4 * C_InfecR_Corection)) == 1)
{
if (ActiveFonctions1 == true)
{
InfecOut = 0;
ActiveFonctions2 = true;
}
}
#endregion
//--------------------------------------------------------------------------------------
#region FFA
if (*((int*)(Client_Team_Indice_Base.ToInt32() + 0x38A4 * C_InfecR_Corection)) == 0 && *((int*)(Client_ConnectionStates__Base.ToInt32() + 0x78688 * C_InfecR_Corection)) == 1)
{
if (ActiveFonctions2 == true)
{
InfecOut++;
if (InfecOut > 2)
{
InfectDetect = true;
}
}
}
#endregion
//--------------------------------------------------------------------------------------
#region Allies
if (*((int*)(Client_Team_Indice_Base.ToInt32() + 0x38A4 * C_InfecR_Corection)) == 2
){
if (DVg_gametype == "infect")
{
ActiveFonctions1 = true;
}
}
#endregion
//--------------------------------------------------------------------------------------
#region FONCTION InfectDetect
if (InfectDetect == true)
{
if (LoadFastRestart == true)
{
if (TempMesg > 0)
{
if (TempMesg == 5000) iPrintLnBold("^2INFECTED^7 has left, Server will fast_restart in " + TempMesg / 1000, null);
if (TempMesg == 4000) iPrintLnBold("^2INFECTED^7 has left, Server will fast_restart in " + TempMesg / 1000, null);
if (TempMesg == 3000) iPrintLnBold("^2INFECTED^7 has left, Server will fast_restart in " + TempMesg / 1000, null);
if (TempMesg == 2000) iPrintLnBold("^2INFECTED^7 has left, Server will fast_restart in " + TempMesg / 1000, null);
if (TempMesg == 1000) iPrintLnBold("^2INFECTED^7 has left, Server will fast_restart in " + TempMesg / 1000, null);
if (TempMesg == 1)
{
TempMesg = 5000;
LoadFastRestart = false;
ServerPrint("INFECTED has left, Server will fast restart!");
ServerLog(LogType.LogConsole, "INFECTED has left, Server will fast restart!");
ServerCommand("map_restart");
}
TempMesg--;
}
}
}
#endregion
//--------------------------------------------------------------------------------------
}
}
//--------------------------------------------------------------------------------------
#endregion


![[Image: 77c85afda648.gif]](http://s018.radikal.ru/i511/1302/21/77c85afda648.gif)

![[Image: 76561198070236721.png]](http://steamsignature.com/status/english/76561198070236721.png)
![[Image: 76561198096107676.png]](http://steamsignature.com/status/english/76561198096107676.png)
![[Image: 76561198164751656.png]](http://steamsignature.com/status/english/76561198164751656.png)