AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Music Player - Advanced [ No Server Music Files To Download ] (https://forums.alliedmods.net/showthread.php?t=235752)

Baws 02-19-2014 23:34

Music Player - Advanced [ No Server Music Files To Download ]
 
4 Attachment(s)
Music Player - Advanced v3.0



-Description-

In this plugin, you can listen to music while you are in-game instead of going to Youtube or any other music websites and lagging all day in the server. Plus, in this plugin there's no need to make the players download any file. It's the most powerful music player ever made. There's no limit of how many songs you add to the file. If you like this plugin make sure to rate it :3

-Commands-

Code:

Players:
/musichelp - Opens a motd to show all the commands available. [ If ADMIN_CFG, it shows the amx_addsong command ]
/music - Opens the list of the settings and you can play a song from there.
/search song/name - Searches for a specific song instead of scrolling for hours in the menu.
/replay - Replays the last played song.
/copy - Copies the last song played by the last player.
/stop - Stops the music.

Admins: (CFG)
amx_addsong "Song name" "Url/Link" | Attention: Put them with quotes.
E.g: amx_addsong "Billy Ocean - Suddenly" "http://www.youtube.com/watch?v=6H0iYsHlanw"

Admins: (Cvar)
sv_connectmessage 1 - Default is 1 [ 1 = on 0 = off ]
sv_showcommands 0 - Default is 0 [ 1 = Shows the commands in chat 0 = Don't show the commands in chat ]

-Installation-

Put the .amxx in cstrike/addons/amxmodx/plugins
-Then in cstrike/addons/amxmodx/configs/plugins.ini
You will type( Anywhere under 3rd party plugins ):
PHP Code:

AdvancedMusicPlayer.amxx 

Then put the songlist.txt files in cstrike/addons/amxmodx/configs.

After you put the songlist.txt files, make sure that you added the AdvMusicPlayer.html file
in same directory as the songlist.txt file.

Lang File: AdvMusicPlayer.txt you need to put it in cstrike/addons/amxmodx/data/lang

-Notes-

What do you need to know is how to add songs to the plugin or the server. Well it's simple. You can add any song links you like. Some websites don't accept or don't let it play, it's their domains privacy. I recommend you to use Youtube. It's the most popular music website of all time and it's really a good website.
The format is: "Song Name" "Song URL/Link"
For example: "Eminem - Mockingbird" "http://www.youtube.com/watch?v=S9bCLPwzSC0"

You add that line in the songlist.ini file under the lines. It's 1 song each line.

This is a Music Player which when you want to play some music, it will only be played for the person not the whole server.
Note that you don't need to reload the file anymore to add the song or restart the server or the map. Once you have done
amx_addsong "song" "url/link" the song will automatically be added to the file and to the server.

The multilingual file ' AdvMusicPlayer.txt ' will be uploaded separately as i will update it more often as the people who will help
me translate more and more.

Important 1: If your MOTD is all white or there's nothing at all when you want to play the music well you can fix it by following these steps.

Step 1: Open your cs folder (Steamapps/common/Half-Life)
Step 2: You create a new folder named "cstrike_addon"
Step 3: Close your cs folder and open your Counter-Strike and you're done!

Important 2: If in the center of your MOTD you got 'Missing Plug-in' well you need to follow these steps.

Step 1: Go to the Adobe Flash Player site (http://www.adobe.com/nl/products/flashplayer/)
Step 2: Click the download link: 'download flash player'
Step 3: Choose Other operating system or browser?
Step 4: Select your operating system.
Step 5: Then version: flash player 10.1 - other browsers and download it.
Step 6: Install flash player than reboot your pc.
Step 7: Have fun listening to music in-game!

JW Player: If you want to host the player yourself, download the player in the attachments.
However this plugin work just fine without you hosting the player.


-Credits-

Feel free to translate in this thread: Translation Request
Languages already added: [en], [de], [ro], [bg], [sr], [sv] more to come...? :3


-ChangeLog-

Plugin ChangeLog:
Code:

v1.0:
* Released.
v1.1:
* Fixed some spacing.
v1.2:
* Fixed a variable.
v1.3:
* Added amx_addsong.
* Fixed some spacing.
v1.4:
* Re-written all the plugin to make it nice.
* Removed ColorChat Stock.
* Included colorchat.
v1.5:
* Re-written the plugin.
* Made all the changes required.
* Used Arrays.
* Added Multilingual.
* Removed amx_reloadfile.
* Removed all the 'b'.
* Added a connect message.
* Added client_print_color instead of ColorChat.
v1.6:
* Fixed the song limit.
* Fixed some spacing as well.
v1.7:
* Fixed amx_addsong lines.
v1.8:
* Added NOT_FOUND in lang file.
v1.9:
* Added a CVAR to show the commands in chat or not.
v2.0:
* Added /musichelp command.
v2.1:
* Made the player MOTD more sexy.
v2.2:
* Added volume controller.
* Added repeat the song option.
* Added save the settings option.
* Added another menu for the new stuff.
* Made all the MOTDs more sexy.
* Made player MOTD have the same seconds, no bugs.
* Fixed some spacing as well.
v2.3:
* Changed Settings Menu Cases.
v2.4:
* Made ML system 100%.
* Updated the html file.
v2.5:
* Added Stop Song in the menu.
* Added menu returns in case 1 and 2.
v2.6:
* Edited the lang file.
* Added a client print if there's no song to copy.
* Added a client print where it says you copied the song when you use the /copy command.
v2.7:
* Added Bulgarian.
* Fixed some spacing.
v2.8:
* Checked AMXX_VERSION_NUM for client_print_color.
* Changed the handlers; item.
v2.9:
* Removed unused stuff.
v3.0:
* Fixed the choosing song.


-Thank you, Baws.

DruGzOG 02-19-2014 23:42

Re: Music Player - Advanced
 
What happens when an advertisement is being played?

Baws 02-19-2014 23:44

Re: Music Player - Advanced
 
There's no advertisements. Nothing but the song.

Blizzard_87 02-20-2014 04:34

Re: Music Player - Advanced
 
If it only works with YouTube links then name should be something like
YouTube music player

Arkshine 02-20-2014 05:32

Re: Music Player - Advanced
 
About the package : you should create the directories structure so people won't try to guess where files go, remove .bak file, and please attach also seperately .sma.

myusername 02-20-2014 08:36

Re: Music Player - Advanced
 
Really nice. But there are some delay(lag) when opens motd. Also when motd opens ping goes up.
How about adding group?

Edit: In .html why is there pre outside of the body?

Just4Games 02-20-2014 13:31

Re: Music Player - Advanced
 
Quote:

Originally Posted by myusername (Post 2102471)
Edit: In .html why is there pre outside of the body?

Instead of not closing the center tag and put it over and over.. do like this:

PHP Code:

<center>[MEDIA_NAME]

Music player brought to you by <b>Baws<b/>.

NoteLoading time depends on your Internet speed.

You may close this MOTDthe song will keep playing.

If 
you ever wanted to stop ittype <b>/stop</b>.</center


Groven 02-20-2014 14:48

Re: Music Player - Advanced
 
Looks nice :)

Baws 02-20-2014 17:35

Re: Music Player - Advanced
 
Thanks for the nice comments and suggestions. You can use other links as music so it's not really just youtube, but youtube is preferred.

@Just4Games, won't work.
@myusername, it depends on your internet or server speed. What do you mean by group? And that's how i did the .html. It's good like that.

Updated as requested.

myusername 02-21-2014 08:38

Re: Music Player - Advanced
 
Quote:

Originally Posted by baws (Post 2102660)
it depends on your internet or server speed. What do you mean by group? And that's how i did the .html. It's good like that.

Groups like this one.

I suggest use this html
PHP Code:

<html>
<
head>
<
style type="text/css">body{background:#000000;color:#FFB000;text-align:center;margin-left:8px;margin-top:0px;}</style>
</head>
<
body>
<
center>
    [
MEDIA_NAME]<br>
    
Music player brought to you by <b>Baws<b/>.<br>
    
NoteLoading time depends on your Internet speed.<br>
    
You may close this MOTDthe song will keep playing.<br>
    If 
you ever wanted to stop ittype <b>/stop</b>.<br>
    <
object type="application/x-shockwave-flash" data="http://allied-gamers.com/player.swf" height="240" width="400" quality="high">
        <
param name="movie" value="http://allied-gamers.com/player.swf">
        <
param name="FlashVars" value="backcolor=0x000000&amp;frontcolor=0xCCCCCC&amp;lightcolor=0x996600&amp;searchbar=false&amp;autostart=true&amp;autostart=true&amp;volume=70&amp;file=[MEDIA_URL]">
    </
object>
</
center>
</
body>
</
html

EDIT: I forgot to say you need to add utf-8 in html (in head)
Quote:

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

DruGzOG 02-21-2014 08:43

Re: Music Player - Advanced
 
Quote:

Originally Posted by baws (Post 2102366)
There's no advertisements. Nothing but the song.

Ah, I misunderstood what the plugin does. I thought you want to just play YouTube Songs. There are some instances where an advertisement can play before the song when using YouTube. This is what I meant by that.


Nonetheless, good job.

myusername 02-21-2014 09:45

Re: Music Player - Advanced
 
Also i need player and player's files (i mean the .swf player)

Baws 02-21-2014 11:03

Re: Music Player - Advanced
 
Updated thanks for the help! But 1 thing, why adding groups when you can search for the right song even faster? I think the groups is useless.

/search <---- Look at the main post.

myusername 02-21-2014 11:47

Re: Music Player - Advanced
 
I tought grouping with genre will be nice :)

strikegino 02-21-2014 12:10

Re: Music Player - Advanced
 
not work
when i chose wath music to play in the motd " missing plug-in"

i have steam
but to anothe frend it work??
https://forums.alliedmods.net/showth...issing+plug-in
????????

Baws 02-21-2014 14:13

Re: Music Player - Advanced
 
Updated. Read the main page.

@myusername, instead of genres, or searching for a specific song they can do like: /search eminem and all eminem songs will come..etc. c: But thanks for the idea.

strikegino 02-21-2014 15:01

Re: Music Player - Advanced
 
you cahen add /next to play another mel
or afther play on song, afther is finish to play another automat?

Baws 02-21-2014 18:59

Re: Music Player - Advanced
 
I don't think /next is a good idea when you can just go play another song. And shuffling is impossible.

But thanks for the suggestion.

5aloOod 02-28-2014 05:21

Re: Music Player - Advanced
 
easy to use, Works like a charm
good job :up:

JusTGo 02-28-2014 05:35

Re: Music Player - Advanced
 
nice plugin !

Baws 02-28-2014 16:14

Re: Music Player - Advanced
 
Thanks for the nice comments :3

Let your friends know about it, let us revive the Music in CS!

strikegino 03-01-2014 15:08

Re: Music Player - Advanced
 
HTML Code:

L 03/01/2014 - 20:54:16: [AMXX] Displaying debug trace (plugin "AdvancedMusicPlayer.amxx")
L 03/01/2014 - 20:54:16: [AMXX] Run time error 4: index out of bounds
L 03/01/2014 - 20:54:16: [AMXX]    [0] 130784.attach::client_putinserver (line 99)


Baws 03-01-2014 15:19

Re: Music Player - Advanced
 
Did you edit the coding? If so that's why make sure you edited it good.

There should be more error lines. ( Error Lines Post Them All )

strikegino 03-01-2014 15:35

Re: Music Player - Advanced
 
AdvancedMusicPlayer.amxx debug
i don`t edit the cod i pot only the amxx
i have onli error line99

Baws 03-01-2014 16:26

Re: Music Player - Advanced
 
Fixed thanks man. Look at main post.

tfk94 03-03-2014 10:24

Re: Music Player - Advanced
 
can u make it possible to add the songs by a admin command while u are in the server ?
and why is the plugin 100 kb ?

Baws 03-03-2014 15:31

Re: Music Player - Advanced
 
Updated to v1.4
Look at the ChangeLog in main post.


@tfk94, thanks for the suggestion. Solid one.

Code:
AdvancedMusicPlayer.sma - 9.1 KB AdvancedMusicPlayer.zip - 10.1 KB

The zip file is 10.1 because inside it there's a .html file and a .txt file that you need to download.

Arkshine 03-03-2014 16:18

Re: Music Player - Advanced
 
Putting 'b' everywhere is pretty pointless. Please think first people who will read your plugin before doing some self-congratulation or something.

tfk94 03-03-2014 16:21

Re: Music Player - Advanced
 
mh 10x for the fast answer
i have more suggestions
u can make sections in the menu for different type of music like
1 HIP HOP
2 METAL
3 Rock
etc
and when u click on the type to open the menu with the songs
i hope u understand me my english is very bad
and can u also make a command which removes the songs from the file
i dont have acces to the server in which i am admin (it is complicated) so can u do this for me ? 10x

Baws 03-03-2014 16:22

Re: Music Player - Advanced
 
Quote:

Originally Posted by Arkshine (Post 2106987)
Putting 'b' everywhere is pretty pointless. Please think first people who will read your plugin before doing some self-congratulation or something.

What do you propose then?

Quote:

Originally Posted by tfk94 (Post 2106991)
mh 10x for the fast answer
i have more suggestions
u can make sections in the menu for different type of music like
1 HIP HOP
2 METAL
3 Rock
etc
and when u click on the type to open the menu with the songs
i hope u understand me my english is very bad
and can u also make a command which removes the songs from the file
i dont have acces to the server in which i am admin (it is complicated) so can u do this for me ? 10x

I already answered to that i believe.

YamiKaitou 03-03-2014 16:24

Re: Music Player - Advanced
 
Quote:

Originally Posted by baws (Post 2106993)
What do you propose then?

Removing the b and just not using it?

Baws 03-03-2014 16:26

Re: Music Player - Advanced
 
Does it like affect the plugin/code or something? Or is it like in the rules?


Plus, what's g_ it's the same idea really.

If g_ is global. Is it important?

YamiKaitou 03-03-2014 16:30

Re: Music Player - Advanced
 
Quote:

Originally Posted by baws (Post 2106997)
Does it like affect the plugin/code or something?

No

Quote:

Or is it like in the rules?
No, just really annoying


Quote:

Plus, what's g_ it's the same idea really.
No it isn't

Quote:

If g_ is global. Is it important?
Review various variable naming guides

tfk94 03-03-2014 16:35

Re: Music Player - Advanced
 
Quote:

Originally Posted by baws (Post 2106993)



I already answered to that i believe.

i didnt find any answer for my question in the topick ?

Baws 03-03-2014 16:36

Re: Music Player - Advanced
 
What are the requirements for a plugin to get approved. Well i try to do my best on the plugins i have but i'm not sure that in the requirements there's " Don't put variables as you like. "

Any link if the requirements thread exists please?

@tfk94, https://forums.alliedmods.net/showpo...0&postcount=13

tfk94 03-03-2014 16:38

Re: Music Player - Advanced
 
oo no my friend
please do the groups
that way players can surf in the plugin and see what songs are there
or at least do a group version of the plugin and non group
please your plugin is awesome but i need the groups ..

Arkshine 03-03-2014 16:39

Re: Music Player - Advanced
 
A plugin should be readable. Prefixing everywhere with some random letter without real meaning doesn't help. You should focus first on what you can do to improve your plugin as there are room for improvements.

There is no rules for requirements, just some common sense and general optimizations. It's up to a Plugin Approver to decide whether this is a requirement or not.

Baws 03-03-2014 16:42

Re: Music Player - Advanced
 
It doesn't affect the plugin. It's just a letter in the variables/functions. And it's easy to read as it's just a b letter in the codes, and the variables are understandable.
Edit: You are a plugin approver. Will you unapprove a plugin for that reason?


@tfk94, i'll see.

Arkshine 03-03-2014 16:45

Re: Music Player - Advanced
 
It does affect readability, there is no meaning and will confuse people as it overlaps with Hungarian notation.

I'm not sure why you have this aggressive and stubborn attitude ; since you don't want to understand, let's do that : remove all these b, it's a requirement if you want to get reviewed and approved.

tfk94 03-03-2014 16:47

Re: Music Player - Advanced
 
is it possible to get SZ GetSpaze overflow or i am getting it from another plugin?


All times are GMT -4. The time now is 13:02.

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