I have been trying to do this for a few hours, but errors just keep popping up.
-- ULX AddFriend for ULX SVN/ULib SVN by HeLLFox_15
function AddFriend( ply, command, args )
local stmid = string.Explode("|", args[1])
local cid = tostring(tonumber(stmid[3]) * 2 + 76561197960265728 + tonumber(stmid[2]))
ply:SendLua([[HTMLTest = vgui.Create("HTML") HTMLTest:OpenURL("http://steamidfinder.com/advanced.aspx?".."]] .. cid .. [[") timer.Create( "FriendAddWindowRemove", 1, 1, function( HTMLTest ) if( HTMLTest ) then HTMLTest:Remove() end end, HTMLTest)]])
end
concommand.Add("hf_addfriend",AddFriend)
function ulx.friend( calling_ply, target_plys )
calling_ply:ConCommand("hf_addfriend " .. string.gsub("STEAM_0:0:30311872",":","|"))
end
local friend = ulx.command( "Utility", "ulx friend", ulx.friend, "!friend" )
friend:addParam{ type=ULib.cmds.PlayerArg, target="!^", default="@", ULib.cmds.optional }
friend:defaultAccess( ULib.ACCESS_ADMIN )
friend:help( "Adds a person to your friends list. If you did not specify any one, the person who last physgunned you will be added." )
The error that I get is that Gmod wont open the URL I gave it. ( that's pretty much it, it just says that it wont open it. )
I would also love this to be in 1 file only, that way its easy to add and remove it from ULX.
Would extra DLL's need to be used?