1. iShot

    iShot Scavenger


    I'm sorry if this question is the most simple thing you've seen today but I'm reasonably new in the world of writing Oxide plugins. I'm currently trying to write a console command that gives ServerReward points to a player, I was hoping I can do that for both online and offline players (as long as they are registered once).

    Is there a way to create a BasePlayer using a steam64 ID even if the player is offline? That way I could forward that BasePlayer to the following command even when he's offline?

    Code (Text):
    ServerRewards?.Call("AddPoints", new object[] { player.userID, 5 });

    Thanks in advance,

  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    If they are dead, they won't have a BasePlayer. If they are sleeping, they'd be in the sleeper list. The better way would be to use Oxide's Covalence methods to get all players from it instead via players.All (or covalence.Players.All if your plugin isn't a Covalence plugin.)
    iShot likes this.