How do i give player weapon instead of using player Loadout!

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
Luddeisbad
Contributor
Contributor
Posts: 11
Joined: Sat Sep 11, 2021 9:57 pm

I want to know how to "delete" Player loadouts because i am trying to implement a buy menu for each game !
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

First, you will have to modify bl_GunManager.cs to not equipped the weapons from the player class loadout,
check the Awake() and Start() function of that script.

To set a weapon to a specific slot you can call the function of bl_GunManager.cs -> ChangeTo(int AllWeaponsIndex);
where 'AllWeaponsIndex' is not the GunID (from GameData) but the index of the FPWeapon in the AllGuns list of bl_GunManager.

I hope this help,
Regards.
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
Luddeisbad
Contributor
Contributor
Posts: 11
Joined: Sat Sep 11, 2021 9:57 pm

I do not understand i wrote the code and took the index "5" from the "all gun" and it should give me "Pistol1" but it dosen't! please help
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Show me your code modification and a screenshot of your player bl_GunManager inspector with the AllGuns list fold out.
How to find your Invoice Number: Here
How to find your Order Number: Here
Post Reply