Originally Posted by
zZzeta/S
You can do it manualy too.
The lowest instance you need is your playercontroler
This one points to Pawn so : PlayerController->Pawn
In the Pawn Class is a Pointer to the next pawn so you can loop through them.
You should also get a Pointer to WorldInfo: PlayerController->pawn->WorldInfo->Pawnlist
If you got all those things you can just loop through all your pawns
Code:
for playerController->Pawn->WorldInfo->PawnList//you will need to cast this into a usable var; target; target = target->NextPawn//cast this also on a usable formart eg AvAPawn)
{
//Do your shit here
//target equals the ava pawn class now
UE3Vector my Pos = PlayerController->Pawn->Location;
target->Location = (myPos.y + 10);
}
If you don't go external you could just hook up process event and do your shit with the sdk
weill,I don't know use sdk should first hook process enent ,and then make any functions eg ((AavaPlayerController*)pPC)->TestServerEndRound(); before you just tell me.
I found this code ,Is it right?
Code:
AavaPlayerController* pPC = NULL;
UObject *pCallObject = NULL;
void __declspec(naked)hkProcessEvent ()
{
__asm mov pCallObject, ecx; //get caller from ecx register and save it in pCallObject
__asm
{
push eax
mov eax, dword ptr [esp + 0x8]
mov pUFunc, eax
mov eax, dword ptr [esp + 0xC]
mov pParms, eax
mov eax, dword ptr [esp + 0x10]
mov pResult, eax
pop eax
} // Manually get the proper parameters for the function
_asm pushad //Save registers on stack
if ( pUFunc ) //make sure pfunc is valid
{
strcpy( FunctionName, pUFunc->GetFullName() ); //get function name
if ( !strcmp( FunctionName, "Function avaGame.avaGameViewportClient.PostRender")) //If its a postrender call
{
UGameViewportClient* viewport = (UGameViewportClient*)pCallObject;
if(viewport) //caller should be a Viewportclient object, make sure it is
{
UGameViewportClient_eventPostRender_Parms* parameters= (UGameViewportClient_eventPostRender_Parms*)pParms; //get the parameters
if(parameters)
{
PostRender(parameters->Canvas); // call a hooked postrender method
}
}
}
else if(!strcmp( FunctionName, "Function Engine.PlayerController.PlayerTick" ))
{
pPC = (AavaPlayerController*)pCallObject;
}
else if( !strcmp( FunctionName, "Function avaGame.avaPlayerController.Destroyed")) //if the playersonctroller gets destroyed, make sure it poins to null
{
if(pPC == pCallObject)
{
pPC = NULL;
}
}
}
__asm popad //restore registers from stack
__asm
{
push pResult
push pParms
push pUFunc
call pProcessEvent
retn 0xC
} //put parameters on stack and call the orginal function
}
UObject* GetViewport()
{
return UObject::FindObject<UObject>("avaGameViewportClient Transient.GameEngine.avaGameViewportClient");
}
UObject* GetPlayerController()
{
return UObject::FindObject<UObject>("avaPlayerControllerEx TheWorld.PersistentLevel.avaPlayerControllerEx");
}
UObject* SkipRound()
{
return UObject::FindObject<UObject>("avaGame.avaPlayerController.TestServerEndRound");
}
void OnAttach ()
{
for(; ; Sleep(30))
{
HookEngine(GetViewport());
HookEngine(GetPlayerController());
HookEngine(SkipRound());
if(GetAsyncKeyState(VK_HOME) & 0x8000)
{
if(pPC->IsA(AavaPlayerController::StaticClass()))
{
Beep(1000, 500);
((AavaPlayerController*)pPC)->TestServerEndRound();
}
}
Sleep(500);
}
}
BOOL WINAPI DllMain ( HMODULE hModule, DWORD dwReason, LPVOID lpReserved )
{
if ( dwReason == DLL_PROCESS_ATTACH )
CreateThread ( NULL, 0, ( LPTHREAD_START_ROUTINE ) OnAttach, NULL, 0, NULL );
Beep(1000, 500);
return TRUE;
}