AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Problem with playing Sound + StrContains doesn't works (https://forums.alliedmods.net/showthread.php?t=133785)

DarkEnergy 07-30-2010 12:48

Re: Problem with playing Sound + StrContains doesn't works
 
remember this?

public OnClientPutInServer(client)
{

CreateTimer(3.0,ExecJoinsound)
}

public
Action:ExecJoinsound(Handle:timer)
{
EmitSoundToAll("fairfailt/zielen.wav")

}

Death [GER] 07-30-2010 17:17

Re: Problem with playing Sound + StrContains doesn't works
 
Code:

public OnClientPostAdminCheck(client)
{
EmitSoundToAll("fairfailt/zielen.wav")
}


Greyscale 07-30-2010 17:52

Re: Problem with playing Sound + StrContains doesn't works
 
I don't think you even need to delay it in OnClientPutInServer. You should be able to play it then.

almcaeobtac 07-30-2010 19:00

Re: Problem with playing Sound + StrContains doesn't works
 
No, because sometimes OnClientPutInServer runs before the client is fully in the game. Sometimes it runs while they are still sending info.

Greyscale 07-30-2010 21:27

Re: Problem with playing Sound + StrContains doesn't works
 
It's going to consistently fire at a certain point every time. There is no "sometimes" it would either not work or always work. I would think it works. Has anyone tried it?

Monkeys 07-30-2010 21:48

Re: Problem with playing Sound + StrContains doesn't works
 
Quote:

Originally Posted by Greyscale (Post 1256735)
It's going to consistently fire at a certain point every time. There is no "sometimes" it would either not work or always work. I would think it works. Has anyone tried it?

Why do you think that?

almcaeobtac 07-31-2010 00:21

Re: Problem with playing Sound + StrContains doesn't works
 
In my experience, I always connect at slightly different times. Sometimes I hear the join sound, sometimes I don't. That is, until I put a 3 second timer on it. Then I heard it every time.


All times are GMT -4. The time now is 21:08.

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