Hi! I am trying to find the correct command to dip the gun, like when you aim at a firendly NPC.
The reason is when you sprint, the gun should not be used. I am also looking to try and force holster the gun if the diping wont work. What i have done so far is In basehlcombatweapon_shared.cpp CBaseHLCombatWeapon::WeaponShouldBeLowered i have added the concommand ConVar nd_sprint_gun( "nd_sprint_gun", "0", FCVAR_CHEAT ); Over in my sprint function I have done this if( pPlayer->IsSprinting() ) { static bool bNDSprint = false; if( bNDSprint ) { // Show gun // We stoped runing cvar->FindVar("nd_sprint_gun")->SetValue(0); } else { // Hide Gun // Sprint away cvar->FindVar("nd_sprint_gun")->SetValue(1); DevMsg("My gun should be lowered\n"); } bNDSprint = !bNDSprint; //check if the gun is down or not if (cvar->FindVar("nd_sprint_gun")->GetInt() == 1);//is it down? else( cvar->FindVar("nd_sprint_gun")->SetValue(0));//well bing it up } Now if i use another command, like mat_fullbright - the convar works - but this convar wont drop my gun - infact i end up crashing in the lower state statment. The guns i'm working with are custom guns, all but the machinegun, that comes from hl2 - do i need to tell the modlers to add an animation event to them for the diping to occur? Any help is much wanted Thanks Adam -------- My Website http://www.ammahls.com Lead Programer NightFall http://www.nightfallmod.net Developer of CST and ZHLT 3.0 http://www.zhlt.info Team Lead - Prime - http://www.nigredostudios.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders