Вы используете устаревший браузер. Этот и другие сайты могут отображаться в нём некорректно. Вам необходимо обновить браузер или попробовать использовать другой.
объясняю [объеснить могу неправильно тк недопастер]
+voicerecord - начинается звук [я хз как сказать]
voice_inputfromfile 1
play voice_input.wav - файл [звук] который будет проигроваться
-voicerecord - отключает звук
ну держи может рабочий сурс а может нет чекать не буду
C++:
if (c_config::get().VoiceKillSay) {
local snd_time = 0.6 //дефолтный f12 звук длится именно столько.
local currentTime = 0
local timer = 0
local currentTime = globals.RealTime() //а вот тут проёбочка, это для ав, хз как для ху0 сам чекни ( CTRL+F и введи RealTime)
if (!Globals::LocalPlayer || !Globals::LocalPlayer->IsAlive())
return;
auto attacker = g_pEntityList->GetClientEntity(g_pEngine->GetPlayerForUserID(event->GetInt("attacker")));
if (!attacker)
return;
if (attacker != Globals::LocalPlayer) {
g_pEngine->ClientCmd("voice_inputfromfile 1");
g_pEngine->ClientCmd("play voice_input.wav" );
g_pEngine->ClientCmd("+voicerecord " ); //почему в таком порядке? не важно, всё равно эти действия выполняются одновременно.
else
g_pEngine->ClientCmd("voice_inputfromfile 0");
g_pEngine->ClientCmd("-voicerecord " );
end
}
}
там может где-то end забыл
короче в чём минус: во первых нужно подключить микрофон, во вторых он автоматически не выключится через 0.6 сек, ты там сам чутка доделай, ок
ну держи может рабочий сурс а может нет чекать не буду
C++:
if (c_config::get().VoiceKillSay) {
local snd_time = 0.6 //дефолтный f12 звук длится именно столько.
local currentTime = 0
local timer = 0
local currentTime = globals.RealTime() //а вот тут проёбочка, это для ав, хз как для ху0 сам чекни ( CTRL+F и введи RealTime)
if (!Globals::LocalPlayer || !Globals::LocalPlayer->IsAlive())
return;
auto attacker = g_pEntityList->GetClientEntity(g_pEngine->GetPlayerForUserID(event->GetInt("attacker")));
if (!attacker)
return;
if (attacker != Globals::LocalPlayer) {
g_pEngine->ClientCmd("voice_inputfromfile 1");
g_pEngine->ClientCmd("play voice_input.wav" );
g_pEngine->ClientCmd("+voicerecord " ); //почему в таком порядке? не важно, всё равно эти действия выполняются одновременно.
else
g_pEngine->ClientCmd("voice_inputfromfile 0");
g_pEngine->ClientCmd("-voicerecord " );
end
}
}
там может где-то end забыл
короче в чём минус: во первых нужно подключить микрофон, во вторых он автоматически не выключится через 0.6 сек, ты там сам чутка доделай, ок
well, hold on, maybe a working course or maybe I won’t check
C++:
if (c_config::get().VoiceKillSay) {
local snd_time = 0.6 // default f12 sound lasts just that much.
local currentTime = 0
local timer = 0
local currentTime = globals.RealTime () // and here is a hole, this is for av, xs, as for xy0 check it yourself (CTRL + F and enter RealTime)
if (!Globals::LocalPlayer || !Globals::LocalPlayer->IsAlive())
return;
auto attacker = g_pEntityList->GetClientEntity(g_pEngine->GetPlayerForUserID(event->GetInt("attacker")));
if (!attacker)
return;
if (attacker != Globals::LocalPlayer) {
g_pEngine->ClientCmd("voice_inputfromfile 1");
g_pEngine->ClientCmd("play voice_input.wav" );
g_pEngine-> ClientCmd ("+ voicerecord"); // why in that order? no matter, all the same, these actions are performed simultaneously.
else
g_pEngine->ClientCmd("voice_inputfromfile 0");
g_pEngine->ClientCmd("-voicerecord " );
end
}
}
there maybe somewhere end forgot
In short, what is the minus: firstly you need to connect a microphone, secondly it will not automatically turn off after 0.6 seconds, you’ll finish it yourself a bit, ok