OSRS Plugin API
    Preparing search index...

    Function getPlayerIdByName

    • Gets the player ID of the player specified by the name, if on-screen.

      Parameters

      • playerName: string

        the name of the player to retrieve the id for.

      Returns number

      The Id of the named player.

      id = osrs.ClientOp.getPlayerIdByName("<EXAMPLE USER>")
      osrs.ClientOp.playerSay(id, "Example Message", 100)