Items when use. ITEM:UseItem(ply)

Hi, Could anyone maybe help me to fix so function ITEM:UseItem(ply) open windows and connect to a given url?

ITEM.Name = “Propaganda”;
ITEM.Class = “propaganda”;
ITEM.Description = “Rebel stuff”;
ITEM.Model = “Gonna fix this later :].mdl”;
ITEM.Purchaseable = true;
ITEM.Price = 10;
ITEM.ItemGroup = 2;

function ITEM:Drop(ply)

end

function ITEM:Pickup(ply)

self:Remove();

end

function ITEM:UseItem(ply)

self:OpenWebBrowser(http://this-is-a-test.com);

end

OpenWebBrowser is not part of the standard Glua library, if it’s defined in your code it probably requires a string so it would be self:OpenWebBrowser(“http://this-is-a-test.com”).

And I’m pretty sure you’ll need a model to be able to use it.

Yes, but then could you help me make that model thingy, also OpenWebBroswer, whas just an examle, I just want a thing that open a windows and go to a url. Idk if this even is a real code.lol

You’d probably have to make a DPanel with a HTML control. Use a usermessage to send the url to the client.

Do you think this works?

http://pastebin.com/d48f52e6b

That’s a start but you’re not done. You still need to send the actual message (that should be done on the item ) and place that function and hook in a client file because HUDs are clientside.

Could anyone edit it? and send back on this topic in pasterbin. Please? Im not good on this. and i got that code from my Friend. but he can’t help me more then that.