Raised This Month: $51 Target: $400
 12% 

Loading Song Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pUnk
Member
Join Date: Apr 2009
Old 04-27-2015 , 20:10   Loading Song Plugin
Reply With Quote #1

I merged Loading Song Advanced into Loading music and this is the result:

Spoiler


But i have a problem now.. I use bots on the server, and whenever i start the server or do a map change bots are added regardless of human players but are kicked when humans enter the server.
The plugin is acting as it should:

Connecting.......MUSIC!! (random)
Connected........MUSIC!! (random) (music played may differ from previous action: "connecting")
TeamChoosing...MUSIC!! (same music when successfully connected)
ModelChoosing...MUSIC!! (same as teamchoosing)
Playing.............MUSIC STOPS!!

All well and swell id say, But heres the thing when someone or a bot successfully connects to the server whereas already "in" the server the music plays for ALL the players already playing in the server. And when someone goes to spec it also plays a music for ALL the players.

Plz someone fix it so that only the player connected or spectating listens to the music and not everyone already inside the server.
Thx in advance for your effort!

Original plugins used:

Loading Song Advanced:
https://forums.alliedmods.net/showthread.php?t=21345
Spoiler


Loading Music + also in spectator:
https://forums.alliedmods.net/showth...=loading+music
Spoiler
pUnk is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 04-28-2015 , 12:24   Re: Loading Song Plugin
Reply With Quote #2

Just add

Code:
    if ( is_user_bot(id) )         return PLUGIN_CONTINUE

before everything else inside songx() and client_connect()
__________________
Black Rose is offline
pUnk
Member
Join Date: Apr 2009
Old 04-28-2015 , 14:39   Re: Loading Song Plugin
Reply With Quote #3

Thank you for your reply :Black Rose:

You mean like this? Plz also note that regardless of the bots music also plays
for everyone already inside the server when humans enter the server
and are still choosing teams.

Spoiler
pUnk is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 04-28-2015 , 16:26   Re: Loading Song Plugin
Reply With Quote #4

When you're using set_task() you send the id as parameter, but you never retrieve it at the other end but still using "id", which is 0 at that point. This would send it to everyone.

You don't have to use param[], you can use the player id as the task id and skip the param[] completely.
__________________
Black Rose is offline
Reply



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 09:39.


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