Coding problem (719606)

[Client]
void Shoot()
{
RaycastHit _hit;
if (Physics.Raycast(cam.transform.position, cam.transform.forward, out _hit, weapon.range, mask))
{
if (_hit.collider.tag == PLAYER_TAG)
{
CmdPlayerShot(_hit.collider.name);
}
}
}

[Command]
void CmdPlayerShot (string _ID)
{
Debug.Log(_ID + " has been shot");
}

Unity gives me this error

UNetWeaver error: Script PlayerShoot uses [Command] CmdPlayerShot but is not a NetworkBehaviour.
UnityEngine.Debug:LogError(Object)
Unity.UNetWeaver.Log:Error(String) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:20)
Unity.UNetWeaver.MonoBehaviourProcessor:ProcessMethods() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/MonoBehaviourProcessor.cs:53)
Unity.UNetWeaver.MonoBehaviourProcessor:Process() (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/MonoBehaviourProcessor.cs:19)
Unity.UNetWeaver.Weaver:ProcessMonoBehaviourType(TypeDefinition) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1126)
Unity.UNetWeaver.Weaver:CheckMonoBehaviour(TypeDefinition) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1639)
Unity.UNetWeaver.Weaver:CheckNetworkBehaviour(TypeDefinition) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1650)
Unity.UNetWeaver.Weaver:Weave(String, IEnumerable1, IAssemblyResolver, String, String, String) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1791) Unity.UNetWeaver.Weaver:WeaveAssemblies(IEnumerable1, IEnumerable1, IAssemblyResolver, String, String, String) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1888) Unity.UNetWeaver.Program:Process(String, String, String, String[ ], String[ ], IAssemblyResolver, Action1, Action`1) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:34)
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:TickCompilationPipeline(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget)

Use code tags:

Format your stuff so we don’t have to struggle to read it.

Finally, did you read the error:

You use the Command attribute:
https://docs.unity3d.com/ScriptReference/Networking.CommandAttribute.html

This is part of the Remote Actions system:
https://docs.unity3d.com/Manual/UNetActions.html

And if you read through it you’ll see that just like the error says, the script PlayerShoot should be inheriting from a ‘NetworkBehaviour’ when you use it. Not from a MonoBehaviour.