Osiris icon indicating copy to clipboard operation
Osiris copied to clipboard

[SUGGESTION] New feature.

Open rosesware opened this issue 7 years ago • 16 comments

A lot of people like to play legit, even without Glow, Chams and even without Aimbot, so I suggested you add if possible "Knife on the left hand" ie weapons and all other items are on the right hand but when we pull to the knife and knife goes to the left hand.

There are binds that help, but they are not so accurate because if we click the "Q" key to change weapons and the knife will not go to the left side.

It is a suggestion that I think is easy to code this feature.

rosesware avatar Aug 11 '19 15:08 rosesware

lot of open sources have this my guy, easy paste

hydemods avatar Aug 11 '19 16:08 hydemods

+1 easy af. just check cl_righthand and if current weapon is knife then force 0 or 1 (if u want weapon in right and knife in left or vice versa)

ghost avatar Aug 11 '19 17:08 ghost

@tirziz idk about others but i feel nostalgic (cs1.6)

ghost avatar Aug 11 '19 17:08 ghost

void Misc::swaphandonknife() noexcept { if (interfaces.engine->isInGame()) { const auto localPlayer = interfaces.entityList->getEntity(interfaces.engine->getLocalPlayer()); if (localPlayer->isAlive()) { const auto activeWeapon = localPlayer->getActiveWeapon(); auto swapknife = interfaces.cvar->findVar("cl_righthand"); if (config.misc.swaphandonknife) { if (activeWeapon->getClientClass()->classId == ClassId::Knife) { swapknife->setValue(0); } if (activeWeapon->getClientClass()->classId != ClassId::Knife) { swapknife->setValue(1); } } } } }

notaila avatar Aug 13 '19 08:08 notaila

i still don't know how to fix the indentation on github

notaila avatar Aug 13 '19 08:08 notaila

you don't even need cheats for this. use an autoexec and have it so that when you press 1 and or 2 it makes cl_righthand 1 and when you press 3 it makes it 0. 1 and 2 being main and pistol and 3 being the knife

DouglasHoyer avatar Aug 13 '19 18:08 DouglasHoyer

you don't even need cheats for this. use an autoexec and have it so that when you press 1 and or 2 it makes cl_righthand 1 and when you press 3 it makes it 0. 1 and 2 being main and pistol and 3 being the knife

Yes but a lot of people use q to change weapons

mindofenzo avatar Aug 18 '19 01:08 mindofenzo

void Misc::swaphandonknife() noexcept { if (interfaces.engine->isInGame()) { const auto localPlayer = interfaces.entityList->getEntity(interfaces.engine->getLocalPlayer()); if (localPlayer->isAlive()) { const auto activeWeapon = localPlayer->getActiveWeapon(); auto swapknife = interfaces.cvar->findVar("cl_righthand"); if (config.misc.swaphandonknife) { if (activeWeapon->getClientClass()->classId == ClassId::Knife) { swapknife->setValue(0); } if (activeWeapon->getClientClass()->classId != ClassId::Knife) { swapknife->setValue(1); } } } } }

NOT WORKING TESTED IT

TianxSky avatar Nov 03 '19 23:11 TianxSky

Did you even call it?

notaila avatar Nov 04 '19 00:11 notaila

@effex1337 ofc

TianxSky avatar Nov 04 '19 01:11 TianxSky

called in misc.h

TianxSky avatar Nov 04 '19 01:11 TianxSky

Show me the snippet how u called it.

notaila avatar Nov 04 '19 02:11 notaila

You only define stuff in misc.h and call it in hooks.cpp->createmove.

notaila avatar Nov 04 '19 02:11 notaila

oh

TianxSky avatar Nov 04 '19 03:11 TianxSky

void swaphandonknife() noexcept;

i called this in misc.h

TianxSky avatar Nov 04 '19 03:11 TianxSky

@effex1337 alright bud i think i got it now tks a lot:kissing_heart:

TianxSky avatar Nov 04 '19 03:11 TianxSky