• Need help with change weapon function
    1 replies, posted
Hello, i want to bind for example KEY_LALT + KEY_B for change weapon to weapon_physgun. I write this but it's don't working: [CODE]hook.Add( "PlayerSwitchWeapon", "ChangeWeapon", function( ply ) if input.IsKeyDown( KEY_LALT ) and input.IsKeyDown( KEY_B ) then ply:SetActiveWeapon( "weapon_physgun" ) end end)[/CODE] [highlight](User was banned for this post ("" - Mezzokoko))[/highlight] [highlight](User was banned for this post ("Wrong Section" - Mezzokoko))[/highlight]
You'll have to do the key detection in a Move hook server-side and network it to the server. Then, the server will have to call SelectWeapon.
Sorry, you need to Log In to post a reply to this thread.