Removing weapons in the hands of death

Support for MFPS 2.0 (for verified users)
Forum rules
To request support/assistance for MFPS, you first have to verify your purchase by sending your purchase invoice number to Lovatto in a PM.
Post Reply
User avatar
Leonid_RU
Contributor
Contributor
Posts: 57
Joined: Tue Sep 11, 2018 3:04 am

Good afternoon!

Tell me how you can remove weapons from the hands of the player (not the bot) after his death. I tried to do it in various ways, but the weapon was still in my hands. The bots managed to remove the weapon without any problems.
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

You mean to throw the weapon after the player dies so the weapon is able to pick up by other players, right?
if's so, this is already implemented, if this is not how works for you, please provide me some details to replicate the scenario.
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
Leonid_RU
Contributor
Contributor
Posts: 57
Joined: Tue Sep 11, 2018 3:04 am

I need the weapon in the player's right hand to simply hide after death (SetActive (false) or Remove). I know about the weapon drop.
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

In this case, the code that you should look at is located in bl_PlayerHealthManager.cs -> Die(...) ->

Code: Select all

 if (bl_GameData.Instance.DropGunOnDeath)
            {
                GunManager.ThrwoCurrent(true, PlayerSync.NetGunsRoot.position + transform.forward);
            }
replace that call with a simple:

Code: Select all

PlayerSync.NetGunsRoot.gameObject.SetActive(false);
How to find your Invoice Number: Here
How to find your Order Number: Here
Post Reply