ItsMods

Full Version: InfectedRestarter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
#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)) == 2Smile)
{
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
Wat?
oui ki ya t il
(10-03-2013, 21:07)lewisbibo Wrote: [ -> ]oui ki ya t il

What?

But Im guessing this either prevents map change if first infected leaves or something
Pardon Huh
ehh? what!
what? Fuu
Nice.
But please add [code] tags.
EURE titoy
(10-12-2013, 18:11)lewisbibo Wrote: [ -> ]EURE titoy

huh?
Pages: 1 2