samuelmaddock / gm-mediaplayer

:tv: Garry's Mod media player which features synchronized streaming media services
MIT License
49 stars 30 forks source link

Question about OpenRequestMenu #6

Closed masonticehurst closed 8 years ago

masonticehurst commented 9 years ago

I was given this to use in my entity to trigger the Request Menu on ENT:Use()

if SERVER then
    util.AddNetworkString("OpenReqMenu")

    function ENT:Use( ply )
        net.Start("OpenReqMenu")
             net.WriteEntity(self)
        net.Send(ply)
    end
else
    net.Receive("OpenReqMenu", function()
        local ent = net.ReadEntity()
        MediaPlayer.OpenRequestMenu(ent)
    end)
end

It seems though that it returns MediaPlayer.OpenRequestMenu: Invalid media player in console and I can't get it to open the menu for the client.

Is there something I'm doing wrong?