static UINT_PTR timer_id = 1; static bool is_hello_scheduled = false;
if (w_param == 0x31) { auto local_player = c_netgame::get()->ref()->get_player_pool()->get_local_player(); if (local_player) { local_player->send("/s А-а-а-а-а!"); } is_hello_scheduled = true; SetTimer(hwnd, timer_id, 1000, NULL); } break; } case WM_TIMER: { if (w_param == timer_id && is_hello_scheduled) { auto local_player = c_netgame::get()->ref()->get_player_pool()->get_local_player(); if (local_player) { local_player->send("/me внезапно закричал от ужаса в его голове"); } KillTimer(hwnd, timer_id); is_hello_scheduled = false; } break; }