首页 > 其他 > 详细

Cod4 SendConsole Command

时间:2020-06-13 19:03:08      阅读:48      评论:0      收藏:0      [点我收藏+]
void SendConsoleCommand(int x,int y,char *cvar)

{
       _asm push cvar //push the arguments to stack

       _asm push x2   //push the arguments to stack

       _asm push x    //push the arguments to stack

       _asm mov esi, 0x4F9AB0  //Set up the call

       _asm call esi  //Do the call 

}

# Usage
if(GetAsyncKeyState(VK_F11))
{
      MessageBoxA(0, "", "Closing", 4);
      EngGameHook.CG_trap_SendConsoleCommand(1, 1, "quit"); // if we press F11 then it‘ll quit
}

Cod4 SendConsole Command

原文:https://www.cnblogs.com/matt1985/p/13121320.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!