Thread Rating:
  • 4 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
InfectedRestarter
#1
Smile 
#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
Reply

#2
Wat?
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#3
oui ki ya t il
Reply

#4
(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
Reply

#5
Pardon Huh
[Image: b_560_95_1.png][Image: b_560_95_1.png][Image: b_560_95_1.png]
Reply

#6
ehh? what!
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply

#7
what? Fuu
[Image: 77c85afda648.gif]
Reply

#8
Nice.
But please add [code] tags.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#9
EURE titoy
Reply

#10
(10-12-2013, 18:11)lewisbibo Wrote: EURE titoy

huh?
~FYANB~ Servers Website

Primary Account:
[Image: 76561198070236721.png]
Secondary Account:
[Image: 76561198096107676.png]
Third Account:
[Image: 76561198164751656.png]
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.