var flip = false;
var isInBuyzone = false;
function onEnterBuyzone() {
var player = Entity.GetEntityFromUserID( Event.GetInt( "userid" ) );
if ( !player ) return;
if ( Entity.IsLocalPlayer( player ) ) {
if ( Event.GetInt( "canbuy" ) ) {
isInBuyzone = true;
}
}
};
function onRoundStart() {
isInBuyzone = true;
};
function onExitBuyzone() {
var player = Entity.GetEntityFromUserID( Event.GetInt( "userid" ) );
if ( !player ) return;
if ( Entity.IsLocalPlayer( player ) ) {
isInBuyzone = false;
}
};
function onClientDisconnect() {
isInBuyzone = true;
};
function onCreateMove() {
var localPlayer = Entity.GetLocalPlayer();
if ( !localPlayer || !Entity.IsAlive( localPlayer ) ) return;
if ( isInBuyzone ) return;
if ( UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script Items", "[DOORSTUCK] Enable") ) {
if ( flip ) {
Global.ExecuteCommand( "+use" );
} else {
Global.ExecuteCommand( "-use" );
}
flip = !flip;
} else if ( !UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script Items", "[DOORSTUCK] Enable") && flip ) {
flip = false;
Global.ExecuteCommand( "-use" );
}
}
Global.RegisterCallback( "round_start", "onRoundStart" );
Global.RegisterCallback( "enter_buyzone", "onEnterBuyzone" );
Global.RegisterCallback( "exit_buyzone", "onExitBuyzone" );
Global.RegisterCallback( "client_disconnect", "onClientDisconnect" );
Global.RegisterCallback( "CreateMove", "onCreateMove" );
UI.AddHotkey( "[DOORSTUCK] Enable" );
блэн а готовый можно?JavaScript:var flip = false; var isInBuyzone = false; function onEnterBuyzone() { var player = Entity.GetEntityFromUserID( Event.GetInt( "userid" ) ); if ( !player ) return; if ( Entity.IsLocalPlayer( player ) ) { if ( Event.GetInt( "canbuy" ) ) { isInBuyzone = true; } } }; function onRoundStart() { isInBuyzone = true; }; function onExitBuyzone() { var player = Entity.GetEntityFromUserID( Event.GetInt( "userid" ) ); if ( !player ) return; if ( Entity.IsLocalPlayer( player ) ) { isInBuyzone = false; } }; function onClientDisconnect() { isInBuyzone = true; }; function onCreateMove() { var localPlayer = Entity.GetLocalPlayer(); if ( !localPlayer || !Entity.IsAlive( localPlayer ) ) return; if ( isInBuyzone ) return; if ( UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script Items", "[DOORSTUCK] Enable") ) { if ( flip ) { Global.ExecuteCommand( "+use" ); } else { Global.ExecuteCommand( "-use" ); } flip = !flip; } else if ( !UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script Items", "[DOORSTUCK] Enable") && flip ) { flip = false; Global.ExecuteCommand( "-use" ); } } Global.RegisterCallback( "round_start", "onRoundStart" ); Global.RegisterCallback( "enter_buyzone", "onEnterBuyzone" ); Global.RegisterCallback( "exit_buyzone", "onExitBuyzone" ); Global.RegisterCallback( "client_disconnect", "onClientDisconnect" ); Global.RegisterCallback( "CreateMove", "onCreateMove" ); UI.AddHotkey( "[DOORSTUCK] Enable" );
Ебать кринж с проверкой на can buyJavaScript:var flip = false; var isInBuyzone = false; function onEnterBuyzone() { var player = Entity.GetEntityFromUserID( Event.GetInt( "userid" ) ); if ( !player ) return; if ( Entity.IsLocalPlayer( player ) ) { if ( Event.GetInt( "canbuy" ) ) { isInBuyzone = true; } } }; function onRoundStart() { isInBuyzone = true; }; function onExitBuyzone() { var player = Entity.GetEntityFromUserID( Event.GetInt( "userid" ) ); if ( !player ) return; if ( Entity.IsLocalPlayer( player ) ) { isInBuyzone = false; } }; function onClientDisconnect() { isInBuyzone = true; }; function onCreateMove() { var localPlayer = Entity.GetLocalPlayer(); if ( !localPlayer || !Entity.IsAlive( localPlayer ) ) return; if ( isInBuyzone ) return; if ( UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script Items", "[DOORSTUCK] Enable") ) { if ( flip ) { Global.ExecuteCommand( "+use" ); } else { Global.ExecuteCommand( "-use" ); } flip = !flip; } else if ( !UI.IsHotkeyActive("Misc", "JAVASCRIPT", "Script Items", "[DOORSTUCK] Enable") && flip ) { flip = false; Global.ExecuteCommand( "-use" ); } } Global.RegisterCallback( "round_start", "onRoundStart" ); Global.RegisterCallback( "enter_buyzone", "onEnterBuyzone" ); Global.RegisterCallback( "exit_buyzone", "onExitBuyzone" ); Global.RegisterCallback( "client_disconnect", "onClientDisconnect" ); Global.RegisterCallback( "CreateMove", "onCreateMove" ); UI.AddHotkey( "[DOORSTUCK] Enable" );
ему жс нужнабрал с осириса думаю ты сможешь подогнать под свою базуC++:void Misc::boy_next_door(UserCmd* cmd) noexcept { if (!localPlayer || !config->misc.doorSpam || localPlayer->isDefusing()) return; constexpr auto doorRange = 200.0f; Trace trace; const auto startPos = localPlayer->getEyePosition(); const auto endPos = startPos + Vector::fromAngle(cmd->viewangles) * doorRange; interfaces->engineTrace->traceRay({ startPos, endPos }, 0x46004009, localPlayer.get(), trace); if (trace.entity && trace.entity->getClientClass()->classId == ClassId::PropDoorRotating) if (cmd->buttons & UserCmd::IN_USE && cmd->tickCount & 1) cmd->buttons &= ~UserCmd::IN_USE; }
а да, не посмотрел на расположение темы,извиняюсьему жс нужна
Не мой скрипт, просто был, я скинулЕбать кринж с проверкой на can buy
Можно просто нетвар m_bInBuyZone чекнуть и все
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz