"BlockAllWeapons" I can't understand how it works

General support.
Post Reply
User avatar
Moor
Member
Member
Posts: 23
Joined: Thu Apr 11, 2019 2:38 pm

This project is without addons.
Everything works well but not in multiplayer mode.
Mfps v1.8


bl_GunManager >
if (bl_GameManager.Instance.GameMatchState == MatchState.Waiting && !bl_GameManager.Instance.FirstSpawnDone)
{
BlockAllWeapons();
}
--------
For client: Your prefab weapons is disabled "BlockAllWeapons()"
--------
At the moment, I solved the situation like this >
if (bl_GameManager.Instance.GameMatchState == MatchState.Waiting && !bl_GameManager.Instance.FirstSpawnDone)
{
BlockAllWeapons();
}
else
{
PlayerSync.SetWeaponBlocked(0);
}
But I didn't understand how do you activate PlayerSync.SetWeaponBlocked (0); without using > bl_GunManager.ReleaseWeapons(bool). "without addons"
Any information would be helpful.
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Maybe if you tell me what are you trying to do I may give you the right answer,
since the functions that you are referring to doesn't require any addon to work correctly.
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
Moor
Member
Member
Posts: 23
Joined: Thu Apr 11, 2019 2:38 pm

Lovatto wrote: Sun Apr 04, 2021 11:51 am Maybe if you tell me what are you trying to do I may give you the right answer,
since the functions that you are referring to doesn't require any addon to work correctly.
Hallo Lovatto.
This topic is not an error and everything works.
It's just that the script method is interesting and difficult for me to understand
If this(1) function is activated at the beginning
(1) if (bl_GameManager.Instance.GameMatchState == MatchState.Waiting && !bl_GameManager.Instance.FirstSpawnDone)
{
BlockAllWeapons();
}
Then where is this(1) function is deactivated
Interesting method

At the moment, as I understand it This(1) function is deactivated (initially) That is, when spawning, If I'm right then whether there can be an error. I mean. If someone has bad ping or lagging Then for him is still bl_GameManager.Instance.GameMatchState == MatchState.Waiting maybe 1 second.

A small example about your project (small error):
1
Image

2
Image
Post Reply