Originally Posted by
NeoStryker
O que está errado com meu código? Quanto aperto Insert nem imprime "test".
Code:
#include <windows.h>
#include <stdio.h>
#include <process.h>
void Ptc(const char *cmd)
{
typedef void(__cdecl*RunConsole)(const char*);
RunConsole OnOff = (RunConsole)0x491D30;
OnOff(cmd);
}
void Main(PVOID)
{
while (1)
{
if (GetAsyncKeyState(VK_INSERT) & 1)
{
Ptc("+SkelModelStencil 1");
printf("test\n");
}
Sleep(100);
}
}
BOOL WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved)
{
if (nReason == 1)
{
AllocConsole();
freopen("CONOUT$", "w", stdout);
_beginthread(Main, 0, 0);
}
return TRUE;
}
Troque pelo que vou passa agr
Code:
#include <windows.h>
#include <stdio.h>
#include <process.h>
void CommandConsole(int Variable, const char *TextOn, const char *TextOff, bool& zsFlag){
typedef void(__cdecl*RunConsoleCommandFn)(const char*);
RunConsoleCommandFn PTCHACK = (RunConsoleCommandFn)LTClientEXE;
if(Variable == 1 && zsFlag == false ){
PTCHACK(TextOn);
zsFlag = true;
}
if(Variable == 0 && zsFlag == true ){
PTCHACK(TextOff);
zsFlag = false;
}
}
void Main(PVOID)
{
while (1)
{
if (GetAsyncKeyState(VK_F11)&1) chams= !chams;
{
CommandConsole(chams,"+SkelModelStencil 1", "+SkelModelStencil 0", nxchams); // Nx Chams
printf("test\n");
}
Sleep(100);
}
}
BOOL WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved)
{
if (nReason == 1)
{
AllocConsole();
freopen("CONOUT$", "w", stdout);
_beginthread(Main, 0, 0);
}
return TRUE;
}