1. I found out I can get steamID of connecting player with this packet.connection.userid but its in unreadable format for me so i cant use it.
    I want to kick players with bad names, illegal characters in name or with names that are already in use on my server by another ID before they are initiated.
     
  2. Wulf

    Wulf Community Admin

    For any language other than C#, you'd need to use Oxide's "rust" library functions. Ex. rust.UserIDFromConnection(packet.connection)

    I may be wrong, but I'm not that familiar with the JavaScript implementation, mainly Lua.
     
  3. Ok i used packet.connection.userid.toString on 76561197990875969 and it got me 76561197990875970 i was like wtf?! :D
    Anyway thanks for your guidance.

    rust.UserIDFromConnection(packet.connection)
    Works fine in js!
     
  4. Wulf

    Wulf Community Admin

    Either should work, I think the rust.UserIDFromConnection was mainly for Lua, since it can't handle int64. :)