Raised This Month: $ Target: $400
 0% 

Start and Stop Playing Mp3


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mlk27
Veteran Member
Join Date: May 2008
Old 01-22-2009 , 05:17   Start and Stop Playing Mp3
Reply With Quote #1

is it possible to make mp3 which playing on client to stop when they disconnect? cause it seems that once you exec client cmd to play the mp3 file, it keeps playing on client even after players quit the server..
Mlk27 is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 01-22-2009 , 06:25   Re: Start and Stop Playing Mp3
Reply With Quote #2

You cant execute any command on player, when he's diconnected from server.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-22-2009 , 08:06   Re: Start and Stop Playing Mp3
Reply With Quote #3

Quote:
Originally Posted by Sn!ff3r View Post
You cant execute any command on player, when he's diconnected from server.
You can.

Code:
public client_disconnect(id) {     engclient_cmd(id, "stop mp3"); // This is not the answer to Mlk22's question, just an example. }
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-22-2009 , 09:12   Re: Start and Stop Playing Mp3
Reply With Quote #4

Quote:
Originally Posted by Dores View Post
You can.


Code:
</p><p>public client_disconnect(id)</p><p>{</p><p> engclient_cmd(id, "stop mp3"); // This is not the answer to Mlk22's question, just an example.</p><p>}
It's "mp3 stop", not "stop mp3".
Code:
public client_disconnect(iCl)         client_cmd(iCl, "mp3 stop");
__________________
hleV is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-22-2009 , 10:18   Re: Start and Stop Playing Mp3
Reply With Quote #5

@hleV: Did you read the comment in that code?

"just an example".

@Sniffer: Thanks.
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 01-22-2009 , 08:19   Re: Start and Stop Playing Mp3
Reply With Quote #6

@up - no!

client_disconnect is called when player already left server.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-22-2009 , 08:23   Re: Start and Stop Playing Mp3
Reply With Quote #7

Quote:
Originally Posted by Sn!ff3r View Post
@up - no!

client_disconnect is called when player already left server.
Are you sure? I think that it's a pre forward, not sure.
(like always, someone is going to -karma me if I'm wrong... look at my sig)

If I'm wrong, you can hook teaminfo and if the team parameter is "UNASSIGNED", then the player disconnected(-Exolent).
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 01-22-2009 , 09:07   Re: Start and Stop Playing Mp3
Reply With Quote #8

Quote:
Originally Posted by Dores View Post
Are you sure? I think that it's a pre forward, not sure.
(like always, someone is going to -karma me if I'm wrong... look at my sig)

If I'm wrong, you can hook teaminfo and if the team parameter is "UNASSIGNED", then the player disconnected(-Exolent).
Yes, I'm sure.

This is post forward.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
Mlk27
Veteran Member
Join Date: May 2008
Old 01-22-2009 , 08:31   Re: Start and Stop Playing Mp3
Reply With Quote #9

Sn!ff3r is probably right about that but im actually looking for workaround to make the mp3 stop playing when they leave. Maybe like playing only the first 10 secs of the mp3 file, if players still in server, then play another 10 secs parts..
Mlk27 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-22-2009 , 10:43   Re: Start and Stop Playing Mp3
Reply With Quote #10

Why couldn't you switch the words so it would be a correct example?
__________________
hleV 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 01:54.


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