Author Topic: [Help] Custom command SteamID finder.  (Read 3186 times)

0 Members and 1 Guest are viewing this topic.

Offline -sG- Broccoli

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
  • Broccoli is love, Broccoli is life<3
[Help] Custom command SteamID finder.
« on: April 01, 2015, 04:11:22 PM »
Hello, Some of my Staff members has regusted a new command that displays the steamID of a player !steamid PLAYER_NAME. I am have the command, and it works, but if the player has disconnect. the command wont work.

So if anyone of you guys can help me/give me a hint for how i can do it so i can get the steamid of a disconnected player aslong they have been on the server.

Here is my code so far.

Code: [Select]
local CATEGORY_NAME = "Broccoli's custom commands."
function ulx.steam_id ( calling_ply, target_ply )
local steamid = tostring ( target_ply:SteamID() )
Msg ( steamid )
ulx.fancyLogAdmin ( calling_ply, true, "#A's The players steam id #T's SteamID ( "..steamid.." ) ", target_ply )
end


local steam_id = ulx.command ( CATEGORY_NAME, "ulx steamid", ulx.steam_id, "!steamid" )
steam_id:addParam { type = ULib.cmds.PlayerArg }
steam_id:defaultAccess( ULib.ACCESS_SUPERADMIN )
steam_id:help ( "Displays the Steamid of the player in chat." )



Thanks.

(Might have posted this in the wrong area)
« Last Edit: April 01, 2015, 04:36:25 PM by -sG- Broccoli »

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: [Help] Custom command SteamID finder.
« Reply #1 on: April 01, 2015, 05:44:28 PM »
Ok, so the reason why you can't see the steamid of a disconnected player with THAT code is cause you can't run it on someone who isn't there.

Go to releases and search for Cobalt's Custom Commands, it contains a !dban command which is exactly what you're looking for.
Once you get to know me, you'll find you'll have never met me at all.

Offline Livaco

  • Full Member
  • ***
  • Posts: 133
  • Karma: -37
    • Livaco
Re: [Help] Custom command SteamID finder.
« Reply #2 on: April 02, 2015, 12:42:14 AM »
The Reson It Doesent Work When They Disconnect Is Because The Server Will Lose The Name And SteamID All Together. Go And Rome Thruh The Consle And Try And Find Their Name. Once You Did That SteamID Should Be There (if I looked properly or if my mind was playing tricks on me)
Here To Help And Be Happy And Help :)

My Website
My Addons
PermaBanV1.0

Quote from:  Livaco on April 12 at 9:10:20 PM
I May Be Dum But Am Still Better Then The Rest

Livaco Products©

Offline -sG- Broccoli

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
  • Broccoli is love, Broccoli is life<3
Re: [Help] Custom command SteamID finder.
« Reply #3 on: April 02, 2015, 05:34:29 PM »
I just made something simelar as DBan. I never tught of that xD haha I have tested the script and it works prety good! Thanks anyways!