Source SDK

Source SDK

评价数不足
How to change weapon's side in Source SDK Base 2013 Singleplayer mod
由 Fox 制作
This short tutorial will teach you how to change weapon's side and how to enable "cl_righthand" command in your mod :3
   
奖励
收藏
已收藏
取消收藏
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!