Particle system in netcode for gameobjects

Hello, im developing a realistic fps with multiplayer using netcode for gameobjects.
Im stuck at trying to get the muzzle flash effect to show for the other player, my particle system is attached to the gun and played with this function:

public void shoot_muzzleflash()
{
        muzzleFlash.Play();
        

}

and im activating this function in an animation with an event.
I tried this:

    [ServerRpc]
    public void CmdStartParticles()
    {
        RpcStart_shoot_muzzleflash();
        shoot_muzzleflash();
    }

    [ClientRpc]
    public void RpcStart_shoot_muzzleflash()
    {
        shoot_muzzleflash();
    }

    public void shoot_muzzleflash()
    {
        muzzleFlash.Play();
        

    }

but then i cant choose the CmdStartParticles() as an event in the animation

im experienced with unity but not with netcode, so sorry if this is a noob question

First issue is you should end your RPCs with ClientRpc suffix for client and ServerRpc suffix for client.
When you shoot, you will send this information to server on player to notify server that you shoot.
Let’s assume that you have a code like this on Client.

private void Shoot()
{
      //Shooting logic
      PlayMuzzleFx();
      if(IsOwner) // make sure that it creates an rpc by only the owner,
     {
             PlayMuzzleForPlayer_ServerRpc(NetworkObjectID);
     }
}

[ClientRpc]
private void PlayMuzzleFx_ClientRpc(ulong targetPlayerID)
{
      if(targetPlayerID != NetworkObjectID) return; //to not play the muzzle particle on each player

      PlayMuzzleFx();
}

private void PlayMuzzleFx()
{
    muzzleFx.Play();
}

and when the server takes this message, it will create to all of the clients by default. It will cause all of the players on each client will use MuzzleFx. To fix that issue, we sent network object id. So in server

[ServerRpc]
PlayMuzzleForPlayer_ServerRpc(ulong playerID)
{
       //get your connected players,i think you store them in some place
      foreach(var player in connectedPlayers)
     {
            player.currentGun.PlayMuzzleFx_ClientRpc(playerID);
     }
}