Source SDK

Source SDK

Not enough ratings
How to change weapon's side in Source SDK Base 2013 Singleplayer mod
By Fox
This short tutorial will teach you how to change weapon's side and how to enable "cl_righthand" command in your mod :3
   
Award
Favorite
Favorited
Unfavorite
Enabling cl_righthand
Enable cl_righthand in code
Open your "c_baseviewmodel.cpp" fille. Find:
#ifdef CSTRIKE_DLL ConVar cl_righthand( "cl_righthand", "1", FCVAR_ARCHIVE, "Use right-handed view models." ); #endif

And remove "#ifdef CSTRIKE_DLL" and "#endif ".

Do the same with
#ifdef CSTRIKE_DLL // If cl_righthand is set, then we want them all right-handed. CBaseCombatWeapon *pWeapon = m_hWeapon.Get(); if ( pWeapon ) { const FileWeaponInfo_t *pInfo = &pWeapon->GetWpnData(); return pInfo->m_bAllowFlipping && pInfo->m_bBuiltRightHanded != cl_righthand.GetBool(); } #endif
Setting deafult weapon position
Open "weapon_<yourweaponname>.txt" and add this 2 lines to it:
"BuiltRightHanded" "0" "AllowFlipping" "1"

That's all!