/
Player.cs
35 lines (31 loc) · 875 Bytes
/
Player.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Threading;
namespace L4D2_AutoBhop_New
{
public static class Player
{
static int p_base;
static int flag;
public static void Start()
{
Thread th = new Thread(readMemory);
th.Start();
}
static void readMemory()
{
do
{
if (Model.autobhop)
{
WinAPI.ReadProcessMemory(Model.game_handle, Model.module_base + Model.player_base, ref p_base, sizeof(int), 0);
WinAPI.ReadProcessMemory(Model.game_handle, p_base + Model.mflags, ref flag, sizeof(int), 0);
}
} while (true);
}
public static bool chk_player_ground()
{
return flag == 129 || flag == 131;
}
}
}