• wondering if finding a player webpage would work??
    13 replies, posted
i know it sounds kinda weird. but is it possible to checks if a player is looking at a webpage with lua. if so how??
What do you mean? Like in their browser in windows?
no not in windows. to check if there looking at a webpage in-game like on your server so i can run a couple of functions when there looking at it
if your talking about your forum/Web page and possibly the steam Web browser then you can do it with php, but you're not being really clear.
like an motd except if they look at a curtain webpage they see a derma frame pop up. An example would be Players looking at google.com - nothing happens Players looking at facepunch.com - make a derma pop up on there screen
Is there a reason you want to do this? If you tell us why, exactly, we could help more.
I could be wrong but: [lua] pHTML = vgui.Create("HTML",Frame) pHTML:SetSize(300,500) pHTML:OpenURL("http://www.google.ca") function pHTML:FinishedURL(url) if string.find(url,"http://facepunch.com/") then --dostuff end end [/lua]
[QUOTE=brandonj4;39598519]I could be wrong but: [lua] pHTML = vgui.Create("HTML",Frame) pHTML:SetSize(300,500) pHTML:OpenURL("http://www.google.ca") function pHTML:FinishedURL(url) if string.find(url,"http://facepunch.com/") then --dostuff end end [/lua][/QUOTE] I want something like that but it did not 't work
[QUOTE=gravelhunter;39598572]I want something like that but it did not 't work[/QUOTE] Use "DHTML" as the panel name instead.
[QUOTE=brandonj4;39598659]Use "DHTML" as the panel name instead.[/QUOTE] It still did not work .
[QUOTE=gravelhunter;39598782]It still did not work .[/QUOTE] [IMG]http://puu.sh/22YeM[/IMG] You're going to have to make your own browser then with a text input and you can check the url from there.
I see but pasting the same url on line 5 in the fist code you sent should have ran [lua] Msg("working") [/lua] but it did not
[QUOTE=gravelhunter;39599097]I see but pasting the same url on line 5 in the fist code you sent should have ran [lua] Msg("working") [/lua] but it did not[/QUOTE] [QUOTE] You're going to have to [B]make your own browser[/B] then with a text input and you can check the url from there.[/QUOTE] By browser I mean panel.
FinishedURL doesn't work anymore IIRC.
Sorry, you need to Log In to post a reply to this thread.