The ping in scoreboard is always 0

I did this to can show the ping in the scoreboard for each player, but for all players the ping is 0:

And i get this warning: Trying to send command for object without authority.

    [SyncVar]
    public int playerPing = 0;

    void Update()
    {
        CmdShowPing(); //Warning Here
    }


    [Command]
    private void CmdShowPing()
    {
        if (NetworkManager.singleton != null)
        {
            playerPing = NetworkManager.singleton.client.GetRTT();
        }
    }

Only call the command if you have authority. (if hasAuthority)

ok, the warning is fixed, but the ping is always 0:
3178465--242290--Untitled.png

GetRTT is null on the server. You need to get the client connection that you want to measure

EDIT:
I meant the Client on the NetManager is null. Atleast So I think