wyozi / wmc-plus

Media center addon for Garry's Mod
MIT License
1 stars 1 forks source link

Add old WMC functions #11

Open comedinha opened 8 years ago

comedinha commented 8 years ago

I make this to use on my server...

hook.Add("PlayerSay", "WMCPStop", function( ply, text, public )
    text = text:lower()
    if text:StartWith("!stop") then
        ply:ConCommand("wmcp_stop")
    elseif text:StartWith("!stopall") then
        if not wmcp.IsAllowed(ply, "play") then ply:ChatPrint("access denied") return end
        for k, v in pairs(player.GetAll()) do
            v:ConCommand("wmcp_stop")
        end
    end
end)
wyozi commented 8 years ago

Wouldn't be hard to do yourself if you wanna make a pull request. Probably need to discuss the best place for the enable/disable button etc.

yupi2 commented 8 years ago

I can do the stop commands and the ULX integration eventually, but what would the purpose of the enable/disable button?

comedinha commented 8 years ago

disable is for "play for all" function, not play for users disabled...