Raised This Month: $188 Target: $400
 47% 

[ANY] Disco Mod! *Updated: 2/26/13


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mitchell
~lick~
Join Date: Mar 2010
Location: noitacoL:
Plugin ID:
2840
Plugin Version:
1.0.0
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    49 
    Plugin Description:
    Makes a disco ball over an admin and plays music!
    Old 03-16-2012 , 21:28   [ANY] Disco Mod! *Updated: 2/26/13
    Reply With Quote #1

    Description:
    If you may have noticed on event scripts there is a disco mod, well im here to tell you that i made that 2x better, with better effects, and better music playing! What i have done is that you can set up to 30 songs in a config file, with this it uses the MOTD panel function, so there's no reason you would need to make clients download large mp3's for something to simple.




    How it works:
    1. Admin (with specified flag type's !discomenu)
    2. The Disco Menu comes up
    3. Select Start Disco
    4. Pick a song, which the installer defines.
    5. Above the admin's head popups a disco ball!
    6. GO back to the menu and push Stop Disco to stop the disco
    7. Or Type motd in chat to turn off your personal music.
    ConVars: (must reload the config if changed mid game)
    DO NOT TOUCH UNLESS YOU KNOW WHAT YOU'RE DOING.

    sm_disco_custommodel - Default "models/roller_spikes.mdl", Set this to a model that will be the disco ball.
    sm_disco_zoffset - Default "0.0", Offset on the Z pos for the lights..
    sm_disco_rotation - Def: "11.25 0.0 11.25", Rotation of the ball.

    Custom Model (S-Low's Disco Ball) Cvars:
    sm_disco_custommodel "models/props/slow/spiegelkugel/slow_spiegelkugel.mdl"
    sm_disco_zoffset "42.0"
    sm_disco_rotation "0.0 11.25 0.0"
    PUT THESE IN YOUR: cfg/sourcemod/plugin.disco.cfg

    Please NOTE THAT YOU NEED TO USE THIS PLUGIN FOR DISCOBALL TO DOWNLOAD TO THE CLIENTS: SM DOWNLOADER


    Current Bugs: (that cant be fixed!)
    • Connecting Late will not play the song to that player
    • If a player is looking at the motd, the page will change.
    • If a player goes to a page it will stop the music
    Commands:
    sm_disco_reloadconfig - Reloads the musicconfig.cfg, with out reloading the plugin. Also recache's the cvars

    Todo:
    1. Make the config file compatible with songs in the local directory.
    2. I tried to add FOG like in the other script, but couldnt get it to work, every where else is abandoned subject, any suggestions on the fog idea?
    3. ?? Suggestions?
    CONFIG FILE TUTORIAL:
    Please Note if you do not want a sound with version 0.1.7 you dont have to have a config file. and it will not play any music.

    The Config file must be saved in the sourcemod/config folder as: musicconfig.cfg

    Code:
    "MusicConfig"
    {
        "DJ Fresh - Gold Dust"
        {
            "path"                "mikes-revenge.net/sandboxx/music/index.php?id=gold_dust.mp3"
        }
        "Skrillex - Cinema"
        {
            "path"                "mikes-revenge.net/sandboxx/music/index.php?id=cinema.mp3"
        }
        "Example - Kickstarts"
        {
            "path"                "mikes-revenge.net/sandboxx/music/index.php?id=Kickstarts.mp3"
        }
    }
    Also i included the webpage i use on my site. Just place it in the site, and then use yoursite.com/disco/index.php?id=SONGNAME.mp3 in the config.
    Link Below

    Credits:
    DoctorMcKay, Even with out asking i used his url for his music
    Fearts, Gave me the idea to re-write the script into sourcemod.

    Changes:
    Code:
    2/26/13 = 1.0.0: Deleted excess stuff, fixed some precache errors, made more cvars.
    6-27-12 = 0.3.0: Deleted most of the removing of the handles, should work fine now i tested it several time witch changing the maps
    4-5-12 = 0.2.0: Fixed a invalid handle error.
    3-18-12 = 0.1.9: Added sm_disco_reloadconfig command.
    3-17-12 = 0.1.8: Added stopmusic command, and also added the custom model built in Added "No song" to the menu.
    3-17-12 = 0.1.7: Lol on the version update and the update date.. anyways i added the function of not needing the config file for songs.
    3-16-12 = 0.1.6: Fixed an error on the menu cause i cant code when im tired.
    3-16-12 = 0.1.5: added round_end hook, so it would make sure to remove the timer.
    3-16-12 = 0.1.4: Fixed the menu crashing, also made it so it finds the ceiling but if its too high then it will create it 312 units above the player, and all lasers point down now, not going up.
    3-16-12 = 0.1.3: Fixed the Disco ball crashing the server, cause it technically existed but not physically.
    3-16-12 = 0.1.2: Fixed the menu not wanting to close.
    3-16-12 = 0.1.1: Changed !disco to !discomenu, might have conflicted with funcommand plugin.
    DOWNLOAD:
    Attached Files
    File Type: zip S-LoW - Disco Ball.zip (342.3 KB, 1293 views)
    File Type: cfg musicconfig.cfg (340 Bytes, 1080 views)
    File Type: zip Website.zip (7.4 KB, 1050 views)
    File Type: sp Get Plugin or Get Source (disco.sp - 1277 views - 11.9 KB)
    __________________

    Last edited by Mitchell; 02-26-2013 at 18:16. Reason: Fixed some bugs
    Mitchell is offline
    Unreal1
    AlliedModders Donor
    Join Date: Dec 2010
    Location: Behind you
    Old 03-16-2012 , 21:42   Re: [ANY] Disco Mod! *Published: 3/16/12
    Reply With Quote #2

    Quote:
    Originally Posted by Mitchell View Post

    DoctorMcKay, Even with out asking i used his url for his music

    LOL
    __________________
    Unreal1 is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Location: noitacoL:
    Old 03-16-2012 , 21:47   Re: [ANY] Disco Mod! *Published: 3/16/12
    Reply With Quote #3

    i went to go show him and he told me i should ask first D:, but he was iight with it.
    __________________
    Mitchell is offline
    Fearts
    ferts of daeth
    Join Date: Oct 2008
    Old 03-16-2012 , 22:42   Re: [ANY] Disco Mod! *Updated: 3/16/12
    Reply With Quote #4

    God damn dude. I suggest he make this like last night and it is already done. You're a beast dude.
    __________________
    Fearts is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Location: noitacoL:
    Old 03-16-2012 , 22:45   Re: [ANY] Disco Mod! *Updated: 3/16/12
    Reply With Quote #5

    Most of it i tipped from like the mod ytou showed me (the admin flags)
    The config was from my shop mod i changed some of it.
    and the disco timer was easy.
    i also ripped the sprites off of vog_fireworks.
    __________________
    Mitchell is offline
    Fearts
    ferts of daeth
    Join Date: Oct 2008
    Old 03-17-2012 , 01:09   Re: [ANY] Disco Mod! *Updated: 3/17/12
    Reply With Quote #6

    EDIT: USE CODE IN OP

    I am using a modified version with a real disco ball model made by S-Low. I attached the files to this post if your interested in the model version.

    Attached Files
    File Type: sp Get Plugin or Get Source (disco.sp - 480 views - 9.6 KB)
    File Type: zip S-LoW - Disco Props.zip (332.5 KB, 259 views)
    __________________

    Last edited by Fearts; 03-17-2012 at 11:44.
    Fearts is offline
    Dr. McKay
    Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
    Join Date: Aug 2011
    Location: Atlantis
    Old 03-17-2012 , 05:04   Re: [ANY] Disco Mod! *Updated: 3/17/12
    Reply With Quote #7

    Looks impressive, especially with the disco ball model.

    I don't mind a few people using my bandwidth, but I'd appreciate if people could host their own MP3s. Can you take my URLs out of your default config?

    You might mention that music requires Flash For Other Browsers on the clients.

    Could a version be made that doesn't play music, only does the disco effects?

    Finally, it'd be nice if you removed the "Made by Mitch" thing in the menu. The majority of people using the plugin won't know who "Mitch" is, and if anyone cares who made it, there's sm plugins.


    Feedback on the code:

    PHP Code:
    public Action:DoUrl(clientString:url[128])
    {
        new 
    Handle:setup CreateKeyValues("data");
        
        
    KvSetString(setup"title""DISCO");
        
    KvSetNum(setup"type"MOTDPANEL_TYPE_URL);
        
    KvSetString(setup"msg"url);
        
        
    ShowVGUIPanel(client"info"setupfalse);
        
    CloseHandle(setup);
        return 
    Plugin_Handled;

    No need for DoUrl to return anything, nor for it to be public. Try this:
    PHP Code:
    DoUrl(clientString:url[128])
    {
        new 
    Handle:setup CreateKeyValues("data");
        
        
    KvSetString(setup"title""DISCO");
        
    KvSetNum(setup"type"MOTDPANEL_TYPE_URL);
        
    KvSetString(setup"msg"url);
        
        
    ShowVGUIPanel(client"info"setupfalse);
        
    CloseHandle(setup);

    Why open Google to stop music? Use about:blank.

    Provide a command accessible to users to turn off the music. Telling them to type motd won't work if the server has a textual MOTD or if basetriggers isn't running.

    Please don't use a cvar for access to a command. Use RegAdminCmd instead and we can continue using our override system.
    __________________

    Last edited by Dr. McKay; 03-17-2012 at 05:11.
    Dr. McKay is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Location: noitacoL:
    Old 03-17-2012 , 10:31   Re: [ANY] Disco Mod! *Updated: 3/17/12
    Reply With Quote #8

    Quote:
    Originally Posted by Dr. McKay View Post
    I don't mind a few people using my bandwidth, but I'd appreciate if people could host their own MP3s. Can you take my URLs out of your default config?
    Will do

    Quote:
    Originally Posted by Dr. McKay View Post
    Could a version be made that doesn't play music, only does the disco effects?
    This version already does that if there is no config, but i will try to add a "no song" option in the menu.

    Quote:
    Originally Posted by Dr. McKay View Post
    Finally, it'd be nice if you removed the "Made by Mitch" thing in the menu. The majority of people using the plugin won't know who "Mitch" is, and if anyone cares who made it, there's sm plugins.
    Yeah i know.

    Quote:
    Originally Posted by Dr. McKay View Post
    Why open Google to stop music? Use about:blank.
    Thats what i was going to do but i got tired making it last night and didnt finish.

    Quote:
    Originally Posted by Dr. McKay View Post
    Provide a command accessible to users to turn off the music. Telling them to type motd won't work if the server has a textual MOTD or if basetriggers isn't running.
    It's in my todo list.

    Quote:
    Originally Posted by Dr. McKay View Post
    Please don't use a cvar for access to a command. Use RegAdminCmd instead and we can continue using our override system.
    Forgot about that option, could have saved me some time, but i also liked this option cause i could change the flag in real time. ANy ideas what the flag should be?
    __________________
    Mitchell is offline
    AeroAcrobat
    AlliedModders Donor
    Join Date: Apr 2011
    Location: lives in a circus
    Old 03-17-2012 , 15:44   Re: [ANY] Disco Mod! *Updated: 3/17/12
    Reply With Quote #9

    24/7 cp_foundry no time limit. worked as I tested first but later nothiung happend. only menu could be opened.

    PHP Code:
    L 03/17/2012 20:30:57: [SMNative "KillTimer" reportedInvalid timer handle 40df01fd (error 1)
    L 03/17/2012 20:30:57: [SMDisplaying call stack trace for plugin "disco.smx":
    L 03/17/2012 20:30:57: [SM]   [0]  Line 211, /home/groups/alliedmodders/forums/files/7/4/2/3/4/100738.attach::StartStopDisco()
    L 03/17/2012 20:30:57: [SM]   [1]  Line 486, /home/groups/alliedmodders/forums/files/7/4/2/3/4/100738.attach::Menu_DiscoSL() 
    __________________

    Last edited by AeroAcrobat; 03-17-2012 at 15:46.
    AeroAcrobat is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Location: noitacoL:
    Old 03-17-2012 , 16:05   Re: [ANY] Disco Mod! *Updated: 3/17/12
    Reply With Quote #10

    Im not 100% sure how tf2 event's are.
    __________________
    Mitchell is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 18:59.


    Powered by vBulletin®
    Copyright ©2000 - 2017, vBulletin Solutions, Inc.
    Theme made by Freecode