1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Sign up for news, events and more!

    You're currently visiting the official DarkRP Forums as a guest. Sign up now to participate in our community and we'll let you know when we have news.

Beta Script that makes it easier to find a players SteamID (Version 1.01)

Discussion in 'DarkRP Addon & Plugin Releases' started by Jkarateking, May 24, 2014.

Thread Status:
Not open for further replies.
  1. Jkarateking

    Jkarateking Member

    1.) Follow this folder path:
    /garrysmod/lua/autorun/server

    2.) Make a new file and call it 'findplayerid.lua'
    3.) Place this code in there :
    Code (Text):
    local function GetSteamID( ply, cmd, args )
        local nick = args[1]
        nick = string.lower( nick )
     
        for k,v in pairs( player.GetAll() ) do
            if ( string.find( string.lower( v:Nick() ), nick ) then
                MsgN( "SteamID: " .. v:SteamID() )
                return
            end
        end
     
        MsgN( "Couldnt find the player")
    end
    concommand.Add( "rp_steamid", GetSteamID )
     
    4.) So let's say that there is a player called fuffyking on your server. In console write 'rp_steamid fuffyking'. Then out will come '> SteamID: STEAM_0:0:16436609' or whatever the players SteamID is. You can also write a shortened version of their name like 'rp_steamid fuffy'.
    5.) Use this whenever you quickly need a players SteamID.

    This is my second code so please enjoy. If the script doesn't work or you encounter a bug please leave a comment.
    I will update this script regularly to add new features to it.
     
    Last edited: May 24, 2014
  2. Jkarateking

    Jkarateking Member

    Just released Version 1.01 which changes the script from clientside to serverside
     
  3. (FPtje) Atheos

    (FPtje) Atheos Main Developer Staff Member

    This script too is copy pasted from the wiki.
     
Thread Status:
Not open for further replies.

Share This Page