Load Offline Player

This example will trigger when a player updates the npc and outputs the result into console. It will load the player outfit from either database (if offline) or from the player object if they are online, much like let plr = Server.searchplayers({id: userid})[0]; would, although not everything is supported with offline players currently.

function onUpdated(pl) {
    let userid = 957;
    const self = this;
    DB.loadplayer(userid, function(plr, updatetime) {
        self.echo(JSON.stringify([plr.hat, plr.head, plr.body]))