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

Playing sounds only once at a time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Isobold
Veteran Member
Join Date: Mar 2004
Old 05-11-2004 , 13:42   Playing sounds only once at a time
Reply With Quote #1

Hi, i've modified a join/leaveplugin, so that it is playing a sound on each connect of a player. It works fine, but at a mapchange, when 10 or more players are connecting at the same time, the sound is playing as often, as players are connecting with only the space between their connects. Thats giving me a great echo, but I would like the sound to be played only once.
Best thing would be, if the sound would only start, when it is not already playing. Does anyone has an idea how I could realize this?
If possible the script should not depend on the length of the sound, so if I change the sound, it should alwayls work, even if its length is double or half...
Attached Files
File Type: sma Get Plugin or Get Source (join_leave.sma - 1175 views - 2.8 KB)
Isobold is offline
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 05-11-2004 , 19:17  
Reply With Quote #2

IMO this plugin should show message/play sound only when you join/leave server (not after map change) I think you should use get_user_time native or something...
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
Isobold
Veteran Member
Join Date: Mar 2004
Old 05-11-2004 , 19:59  
Reply With Quote #3

the problem is, that users under steam reconnect on each mapchange...

If the server changes a map, the hole connectionprocess restarts from the beginning...

But even without this, I would like the plugin to play the sound only once at a time (for example if 2 users connect at the same time). Is there any possibility to find out, wether the sound is always playing or not? If yes, a simple if-then-else-construct would solve my problem...
Isobold is offline
Isobold
Veteran Member
Join Date: Mar 2004
Old 05-12-2004 , 21:12  
Reply With Quote #4

*bump*

Does at least a time variable would solve my problem ?

How can I get the servertime???
Isobold is offline
ts2do
Senior Member
Join Date: Mar 2004
Old 05-13-2004 , 09:58  
Reply With Quote #5

somethin like get_gametime ....
ts2do is offline
Send a message via AIM to ts2do
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 06:06.


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