Ulysses

General => Developers Corner => Topic started by: -sG- Broccoli on April 01, 2015, 04:11:22 PM

Title: [Help] Custom command SteamID finder.
Post by: -sG- Broccoli 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)
Title: Re: [Help] Custom command SteamID finder.
Post by: Caustic Soda-Senpai 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.
Title: Re: [Help] Custom command SteamID finder.
Post by: Livaco 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)
Title: Re: [Help] Custom command SteamID finder.
Post by: -sG- Broccoli 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!