You can do as others have told you, but it's possible to change the console commands without calling them from a D3D function.
There is a check for the thread ID and a check for the thread EP, it must be in range of Engine.exe code section.
To bypass the thread check, find the pointer where the real thread ID is stored and store the value, then change the DWORD to your thread ID before you change the console command, and then restore the real ID (just so that Engine.exe internal commands work again, otherwise only your DLL commands would work).
To bypass the range check you can change the EP located in the stack to a random address in the range of Engine.exe code section. To find the EP value:
mov eax,dword ptr fs:[18h] // TEB
mov eax,dword ptr ds:[eax+4h] // TEB.TopOfStack
mov dword ptr ds:[eax-0Ch],SOME_ADDRESS // TEB.TopOfStack.ThreadEP