AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Play sound when hud shows (https://forums.alliedmods.net/showthread.php?t=223083)

MrKiller2010 08-09-2013 16:41

Play sound when hud shows
 
How can i make that a small .wav file plays when i start this game?

PHP Code:

public Foodgame()
{
g_iCurrentGame GAME_Food

new iPlayers[32]
new 
iNum
new id

get_players
iPlayersiNum"a" )

for( new 
0iNumi++ )
{
id iPlayers[i]

set_hudmessage 102102102, -1.00.3500.15.00.10.1, -
show_hudmessage 0"[DLO_JSS]: foodgame Started!")

strip_user_weaponsid )

if (
cs_get_user_team(id) == CS_TEAM_CT)
{
give_item(id"weapon_knife")
set_user_health(id,150)
fm_reset_user_model(id)


else if (
cs_get_user_team(id) == CS_TEAM_T)
{
give_item(id"weapon_knife")
set_user_health(id35)

}

}



MrKiller2010 08-09-2013 16:54

Re: Play sound when hud shows
 
Nvm, close this. Figured out!

Balck 08-09-2013 16:54

Re: Play sound when hud shows
 
add this :S

PHP Code:

client_cmd(0"spk folder/yoursound.wav"); 

or change 0 to id if you wnat to speak sound for clien

MrKiller2010 08-09-2013 16:55

Re: Play sound when hud shows
 
Quote:

Originally Posted by Balck (Post 2009527)
add this :S

PHP Code:

client_cmd(0"spk folder/yoursound.wav"); 


Fixed it already, thanks for the help anyway.


All times are GMT -4. The time now is 15:56.

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