Thread: EmitSoundToAll
View Single Post
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 05-01-2020 , 00:10   Re: EmitSoundToAll
Reply With Quote #2

Maybe try this? Not tested.

PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>

#define SONG1 "curlytoenails.mp3"

public Plugin myinfo =
{
    
name "SOUNDS",
    
author "cool",
    
description "Plugin that does stuff",
    
version "1.0",
    
url ""
};

public 
void OnPluginStart()
{
    
RegAdminCmd("sm_curlytoenails"Command_CurlyToeNailsADMFLAG_GENERIC);
}

public 
void OnMapStart()
{
    
PrecacheSound(SONG1);
    
AddFileToDownloadsTable("sound/curlytoenails.mp3");
}

public 
Action Command_CurlyToeNails(int clientint args)
{
     
EmitSoundToAll(PATH);
     
PrintToChatAll("My kenny do eat curly toe nails tho");

     return 
Plugin_Handled;

PC Gamer is offline