Todo : Update Player Pointer
Todo : Update CBase Reclass
Todo : Update CPlayer Reclass
Todo : Update Add PlayerOPKItem to your Menu
Todo : Try to understand the source by reading the Comments , If you just copy it , you will never be able to Create things yourself
Credits :
Code ( Cyno__™ )
Comments ( Cyno__™ )
Todo : Update CBase Reclass
Todo : Update CPlayer Reclass
Todo : Update Add PlayerOPKItem to your Menu
Todo : Try to understand the source by reading the Comments , If you just copy it , you will never be able to Create things yourself
Credits :
Code ( Cyno__™ )
Comments ( Cyno__™ )
Code:
int PlayerOPKItem = 0;
struct CPlayer
{
int index;
float X;
float Y;
float Z;
};
struct CBase
{
CPlayer * m_pLocalPlayer;
char GlobalPtr[123456];
CPlayer ** m_pGlobalPlayers;
};
unsigned long PlayerPointer = 0x0;
unsigned long __stdcall PlayerOPK ( void * lpParam )
{
UNREFERENCED_PARAMETER ( lpParam );// Ignore Unreferenced Parameter Warining
CBase * pBase = ( CBase * )(PlayerPointer);// Init our Reclass with the Original WR Class Pointer
bool bTeleportMyself = true; // Helper Var to Check if theres a new Round and we have to Teleport ourself
while ( true ) // Endless Loop
{
if ( PlayerOPKItem ) // Menu Items = On ?
{
if ( pBase->m_pLocalPlayer ) // Do we Live ?
{
if ( bTeleportMyself )// Do we need to Teleport us once ?
{
pBase->m_pLocalPlayer->X = 0.0f;// Set our X Pos to 0 ( once )
pBase->m_pLocalPlayer->Y = 0.0f;// Set our Y Pos to 0 ( once )
pBase->m_pLocalPlayer->Z = 0.0f;// Set our Z Pos to 0 ( once )
bTeleportMyself = FALSE;//Teleported us once we are Living ? Do do it anymore
}
for ( int i = 0; i < 32 ; i++ )// Loop trough all Players
{
if ( pBase->m_pGlobalPlayers[i] )// Pointer to Global Player Valid ( != 0 ) ?
{
if ( i != pBase->m_pLocalPlayer->index )// Teleport all ( 0-32 Players ) but not ourself to Position 0.0f
{
pBase->m_pGlobalPlayers[i]->X = 0.0f;// Set Player(i)'s X Pos to 0
pBase->m_pGlobalPlayers[i]->Y = 0.0f;// Set Player(i)'s Y Pos to 0
pBase->m_pGlobalPlayers[i]->Z = 0.0f;// Set Player(i)'s Z Pos to 0
}// End Index Check ( Global Player is not our own Player )
}// End Valid Ptr Check
}// End Loop trough all Players
}
else
{
bTeleportMyself = TRUE;// Are we Dead ? Teleport us once when we are living again
Sleep ( 200 );// Dont Overload
}
}
else
{
Sleep ( 200 );// Var is Off -> Chillout 200ms ( anti overload )
}
}
return NO_ERROR;// Should never Reach this under normal circumstances
}
int __stdcall DllMain ( HINSTANCE__ * hModule , unsigned long ulReason , void * lpReserved )
{
UNREFERENCED_PARAMETER(lpReserved);// Ignore Unreferenced Parameter warning
if ( ulReason == DLL_PROCESS_ATTACH )
{
CreateThread ( 0 , 0 , & PlayerOPK , 0 , 0 , 0 );
}
}