Raised This Month: $ Target: $400
 0% 

How to play sound on command [CS:GO]


Post New Thread Reply   
 
Thread Tools Display Modes
thecount
Veteran Member
Join Date: Jul 2013
Old 07-31-2015 , 22:51   Re: How to play sound on command [CS:GO]
Reply With Quote #21

Quote:
Originally Posted by Headline22 View Post
you dont need the astris...
For csgo you do...
thecount is offline
Sunyata
Senior Member
Join Date: Nov 2017
Location: Wherever I am
Old 04-08-2018 , 11:05   Re: How to play sound on command [CS:GO]
Reply With Quote #22

Perhaps a bit late in the day, but whatever

PHP Code:
#include <sourcemod>

// HELP NOTES ON CREATING A SIMPLE DEFAULT SOUND FILE FROM GAME
// !sm_play <playername> buttons/blip1.wav  --- from chat console - plays sound to client
//sounds shown here are taken from L4D1 path folder: \steamapps\common\left 4 dead\left4dead\sound\buttons\blip1.wav

public OnPluginStart()  

    
RegConsoleCmd("sm_sound"Play_Sound); // type !sound in chat console
}

public 
Action:Play_Sound(clientargs)
{
    
//note - 'buttons' is folder where wav sound file is located
    
ClientCommand(client"play buttons/blip1.wav"); // working example playing sound to client
    //ClientCommand(client, "play buttons/button14.wav"); // another sound
    //ClientCommand(client, "play UI/helpful_event_1.wav");  // another sound
    //ClientCommand(client, "play items/itempickup.wav");  // another sound

Sunyata is offline
ZASTRELIS
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
Old 01-04-2021 , 13:51   Re: How to play sound on command [CS:GO]
Reply With Quote #23

Which the default sound when player received the message in chat?
ZASTRELIS is offline
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 19:07.


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