-
Notifications
You must be signed in to change notification settings - Fork 0
/
OPK.cpp
61 lines (57 loc) · 1.26 KB
/
OPK.cpp
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "stdafx.h"
#include "Structs.h"
#include "Addresses.h"
#include "Cheats.h"
extern struct CBase* p_Player;
extern sCPlayerInfo* GetGlobalInfo( int dwPlayerIndex );
extern CPlayer Player;
void OPKThread()
{
while(1)
{
if ( Player.pPlayer !=0 )
{
if ( Player.m_iOPK )
{
for(int i = 0; i < 32; i++)
{
sCPlayer* pPlayer = p_Player->pGlobal[i];
pPlayer->PosX = 20;
pPlayer->PosY = 20;
pPlayer->PosZ = 20;
}
}
if ( Player.m_iZOPK )
{
for (int index = 0; index < 32; index++)
{
sCPlayerInfo *pInfo = GetGlobalInfo(index);
sCPlayer* pPlayer = p_Player->pGlobal[index];
if (pInfo && pPlayer)
{
sCPlayerInfo *pLocalInfo = GetGlobalInfo(p_Player->pLocal->index);
if (pInfo->TEAM != 0)
{
if (pInfo->HEALTH > 0)
{
pPlayer->PosX = (p_Player->pLocal->PosX + 145);
pPlayer->PosY = (p_Player->pLocal->PosY);
pPlayer->PosZ = (p_Player->pLocal->PosZ);
}
}
}
}
}
if ( Player.m_iSVP )
{
for(int i = 0; i < 32; i++)
{
sCPlayer* pPlayerA = p_Player->pGlobal[i];
pPlayerA->PosX=(i*50);
pPlayerA->PosY=0;
pPlayerA->PosZ=0;
}
}
}
}
}