AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [CS:GO] EmitSoundToAll (https://forums.alliedmods.net/showthread.php?t=263985)

GinNNy 06-06-2015 00:25

[CS:GO] EmitSoundToAll
 
I tried using EmitSoundToAll here is the code:
PHP Code:

#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR "GinNNy"
#define PLUGIN_VERSION "0.00"

#include <sourcemod>
#include <cstrike>
#include <sdktools>


public Plugin myinfo 
{
    
name "Emit sound test",
    
author PLUGIN_AUTHOR,
    
description "",
    
version PLUGIN_VERSION,
    
url ""
}

public 
void OnPluginStart()
{
    
    
HookEvent("round_start",NewRoundCallBack);
    
}
public 
OnMapStart()
{
    
PrecacheSound("test/test_start.wav"true);
    
AddFileToDownloadsTable("sound/test/test_start.wav");  
}
public 
Action:NewRoundCallBack(Handle:hEvent,cons String:sConVar[],bool:bDontBroadCast)
{
    
PrintToChatAll("Round start event been called");
    
EmitSoundToAll("test/test_start.wav");


I downloaded the file by the server but the problem when round_start event been called the sound never been played am i doing something wrong there?

KissLick 06-06-2015 05:21

Re: [CS:GO] EmitSoundToAll
 
CS:GO quirks... :-/ https://wiki.alliedmods.net/Csgo_quirks#Workarounds

DabuDos 06-06-2015 07:24

Re: [CS:GO] EmitSoundToAll
 
From my knowledge you need to create a little timer for the RoundStart Event to play sounds.
Also take a look at the csgo quirks as KissLick said. I also would recommend you to use EmitSoundAny for csgo ;)


All times are GMT -4. The time now is 17:58.

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