1. Hi, is there any way to generate a new BasePlayer to perform operations on just from their SteamID?

    Thanks!
     
  2. Wulf

    Wulf Community Admin

    You can lookup the BasePlayer from their Steam ID, but I don't think you'd need to create one.
     
  3. Alright, thanks for the swift reply. :)
     
  4. Wulf

    Wulf Community Admin

  5. BasePlayer.FindByID(ulong steamID)
     
  6. Code:
    using System;var p = BasePlayer.FindByID(Convert.ToUInt64(player.UserIDString));
     
  7. Wulf

    Wulf Community Admin

    You don't need to convert a player's User ID to a long, it already exists as a ulong, just don't use the string variable.
    Code:
    player.userID
    You won't have the player if you are looking for it though.
     
  8. Didn't I say that already? :p I do not think he has a 'player' variable, as thats what he tried to get. He just has a SteamID. Also why would you take the UserIDString and then convert it back to ULong? Why don't you just use userID instead? :)
     
    Last edited by a moderator: Apr 3, 2016
  9. Ok, I understood