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.
Solved Getting ID from connection packet (JavaScript)
Discussion in 'Rust Development' started by Pleskac, Sep 11, 2015.
-
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. -
Ok i used packet.connection.userid.toString on 76561197990875969 and it got me 76561197990875970 i was like wtf?!
Anyway thanks for your guidance.
rust.UserIDFromConnection(packet.connection)
Works fine in js! -
Wulf Community Admin