Player.GetBySteamID
Skip to content
mnscript
Player Player.GetBySteamID(string) 

Description ​

Returns the Player with the given SteamID

Arguments ​

string - The SteamID to search for

Returns ​

Player - The found Player

Example ​

msc
using Player;
using Console;

// Finds a player with the SteamID STEAM_0:1:34409736, checks if they are online and shows their name.

Player ply = Player.GetBySteamID("STEAM_0:1:34409736");

if(ply.IsValid()){
    Console.WriteLine("Player online: "..ply.GetName());
}else{
    Console.WriteLine("The player is not online :(");
}