forked from TeamUlysses/ulib
UCL Helper Function
Adding a helper function to UCL to grab information about a player entry by steamid/ip/uid.
This commit is contained in:
parent
6690bba964
commit
71ae36fa6b
@ -549,6 +549,29 @@ function ucl.getUserRegisteredID( ply )
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
Function: ucl.getUserInfoFromID
|
||||
|
||||
Returns a table containing the name and group of a player in the UCL table of users if they exist.
|
||||
|
||||
Parameters:
|
||||
|
||||
id - The SteamID, IP, or UniqueID of the user you wish to check.
|
||||
]]
|
||||
|
||||
function ucl.getUserInfoFromID( id )
|
||||
|
||||
ULib.checkArg( 1, "ULib.ucl.addUser", "string", id )
|
||||
id = id:upper() -- In case of steamid, needs to be upper case
|
||||
|
||||
if ucl.users[ id ] then
|
||||
return ucl.users[ id ]
|
||||
else
|
||||
return nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
--[[
|
||||
Function: ucl.addUser
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user