AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Dispenser Music Choice - Rex Subplugins (https://forums.alliedmods.net/showthread.php?t=325577)

Seacrh_Inkeeper 06-27-2020 15:42

[TF2] Dispenser Music Choice - Rex Subplugins
 
12 Attachment(s)
Hi!

It's my first post here, so don't judge strictly :)
Also, my English isn't so good as it can be, so I'm sorry for some grammatic mistakes if they have place to be here.

Updated the old one plugin (ordinary post - https://forums.alliedmods.net/showthread.php?p=1982288) with some new features.

Old ones:

1) sm_dispenser or !dispenser - Allow your dispensers playing music. Rebuild your dispenser after changing this setting.
2) Songs are going one by one.

New features:

1) Commands:

1.1) sm_dm <number> or !dm <number> - select the current song for your dispenser if it's built. Song list based on config further down the post. Default Flag - Reservation.
1.2) sm_dmtarget @player <number> or !dmtarget @player <number> - the same as previous one, but now you can select dispenser music for other players (only for 1 per time). Default Flag - Cheats.
1.3) sm_dmall <number> or !dmall <number> - select music for all dispensers on map. Will not work, if dispenser has no owner, forced by RTD or disabled by the owner with !dispenser command. Default Flag - Cheats.
1.3.1) CVAR sm_dmusic_delay (def = 30.0) - players can't select music with !dm after someone used !dmall for this amout of seconds.
1.4) Use sm_dmusic_override (def = "") (in admin_overrides.cfg) to select flag for player's dispenser playing music. Players without this permission will not get music in their dispensers.

2) Now plugin is fully compatible with backpackdispenser and multiple_buildings plugins.
3) Music removes after end of the round or dispenser owner's death (and if dispenser was destoyed).

4) !dm can be used only if:
4.1) You are alive
4.2) You are engineer
4.3) You have build the dispenser
4.4) You turned on !dispenser command, which allows playing music

5) If some dispensers are in the one area at the same moment, admin can use !dmall to select one melody for all of them, which will be bassboosted for as many dispensers as are beside each other.

Some bugs:

1) !dm_all will not work, if there are more than 5 dispensers in one place at the same moment.
2) The same for !dm and !dmtarget if you use multiple_buildings plugin.
3) Rare error: !dm, !dmtarget, !dmall only remove sounds without playing the selected ones. Just rewrite the command.

Config goes to addons/sourcemod/configs. Don't forget to add something! And never leave the directory fields empty, it will crash server! (working on hook event for that one).
Plugin goes to addons/sourcemod/plugins.

Also, if your server is running Dispenser Music plugin, you must remove it to make this plugin works correctly (or you will have 2 sounds in 1 dispenser at the same time).

Here you can see how it works: https://www.youtube.com/watch?v=ZBGz_W_4lTs

Code:

Change logs:

[30.06.2020] (v1.1.2)
- Added sm_dmusic_override to select player's preferences to play dispenser music.

[29.06.2020] (v1.1.1)
- Deleted some code garbage.
- Now code uses new syntax everywhere.
- Edited post with some tags.

[27.06.2020] (v1.1.0)
- Release.


Mr_panica 06-29-2020 10:16

Re: [TF2] Dispenser Music Choice - Rex Subplugins
 
Great plugin.
Maybe you should add a variable that will do a “radio effect” for all songs?

Mr_panica 06-29-2020 10:27

Re: [TF2] Dispenser Music Choice - Rex Subplugins
 
And can you make access to playing music?
For example, I want music to play only with VIPs.
As I understand it, initially everyone plays music.

Seacrh_Inkeeper 06-29-2020 16:17

Re: [TF2] Dispenser Music Choice - Rex Subplugins
 
Quote:

Originally Posted by Mr_panica (Post 2707814)
And can you make access to playing music?
For example, I want music to play only with VIPs.
As I understand it, initially everyone plays music.

No worries, m8!

At version 1.1.1 everyone's dispenser can play random music, but only VIPs (ADMFLAG_RESERVATION) can select them with !dm.

By the next hour will create flags to play music for.

In the nearest future I will try to make custom soundlist, which can be created with .cfg by form like "file" "way-to-file" "number-of-songlist" "name" "artist", and at the begining of config list of soundlists like "0" "soundlist_name" "flag to use", for example: "1" "Rock-n-roll" "a", and these soundlists will be shown as menu to select them.

Before that time, you can create your own menu with menu_creator for example.

P.s. Если что, я Русский) [P.s. I am Russian btw]

Seacrh_Inkeeper 06-29-2020 17:35

Re: [TF2] Dispenser Music Choice - Rex Subplugins
 
Quote:

Originally Posted by Mr_panica (Post 2707814)
And can you make access to playing music?
For example, I want music to play only with VIPs.
As I understand it, initially everyone plays music.

Done! Use sm_dmusic_override in admin_overrides.cfg to select flags for playing music! If player has no permision, he will be suggested to get a VIP. Just get the 1.1.2 Version.

q1085909155 03-23-2023 10:44

Re: [TF2] Dispenser Music Choice - Rex Subplugins
 
Quote:

Originally Posted by Seacrh_Inkeeper (Post 2707860)
No worries, m8!

At version 1.1.1 everyone's dispenser can play random music, but only VIPs (ADMFLAG_RESERVATION) can select them with !dm.

By the next hour will create flags to play music for.

In the nearest future I will try to make custom soundlist, which can be created with .cfg by form like "file" "way-to-file" "number-of-songlist" "name" "artist", and at the begining of config list of soundlists like "0" "soundlist_name" "flag to use", for example: "1" "Rock-n-roll" "a", and these soundlists will be shown as menu to select them.

Before that time, you can create your own menu with menu_creator for example.

P.s. Если что, я Русский) [P.s. I am Russian btw]

hey!Seacrh_Inkeeper,Did you finish the task? It's cool to have a menu where you can choose music

305like 09-08-2023 19:31

Re: [TF2] Dispenser Music Choice - Rex Subplugins
 
Good plugin, but I think it would be better to add effects here
Can you make the note effects on the earbuds work when music is playing?


All times are GMT -4. The time now is 10:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.