Skip to content

Commit bb809d1

Browse files
authored
Create Get_Player_Weapons.cpp
1 parent 5080f0f commit bb809d1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

examples/Get_Player_Weapons.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// it will return weapons ids, not class id.
2+
// silah id leri dönecektir. class id değil.
3+
int* GetPlayerWeapons(){
4+
int playerWeaponIds[16];
5+
int wi1;
6+
int wi2;
7+
for(int i = 0; i < 16; i++){
8+
g_pEsp->ReadBytes((LPCVOID*)(entityPoint + g_pOffsets->m_hMyWeapons + (i * 0x4)), 4, &wi1);
9+
if(wi1 != 0xffffffff){
10+
wi1 &= 0xFFFF;
11+
g_pEsp->ReadBytes((LPCVOID*)(g_pCsgo->client_dll_base + g_pOffsets->dwEntityList + (wi1 - 1) * 0x10), 4, &wi2);
12+
g_pEsp->PlayersWeaponsPoints[g_pEsp->PlayersWeaponsPointsIndex++] = wi2;
13+
g_pEsp->ReadBytes((LPCVOID*)(wi2 + 12202), 4, &playerWeaponIds[i]);
14+
} else{
15+
playerWeaponIds[i] = 0;
16+
}
17+
18+
}
19+
}

0 commit comments

Comments
 (0)