Raised This Month: $51 Target: $400
 12% 

[CS:GO] sound command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
drespy
Member
Join Date: Jul 2018
Old 02-09-2020 , 11:52   [CS:GO] sound command
Reply With Quote #1

hi guys, i need a plugin in which player type a command, and playing a sound, and have a delay for using this command

thx
__________________
|Contact me via Steam|

drespy is offline
alphaearth
Senior Member
Join Date: Feb 2018
Location: Turkey
Old 02-17-2020 , 17:03   Re: [CS:GO] sound command
Reply With Quote #2

simple

Code:
#define PLUGIN_AUTHOR ""
#define PLUGIN_VERSION "1.0"
#include <sourcemod>
#include <emitsoundany>
#pragma newdecls required

public Plugin myinfo = 
{
	name = "sound music",
	author = PLUGIN_AUTHOR,
	description = "",
	version = PLUGIN_VERSION,
	url = ""
};

public void OnPluginStart()
{
	AddCommandListener(OnSayCmd, "say");
	AddCommandListener(OnSayCmd, "say_team");
	PrecacheSoundAny("musictest.mp3");
	AddFileToDownloadsTable("sound/musictest.mp3");
}

public Action OnSayCmd(int client, char[] command, int argc)
{
	char text[192];
	GetCmdArgString(text, sizeof(text));
	StripQuotes(text);
	TrimString(text);
	if(StrEqual(text, "musictest", true))
	{
		EmitSoundToClientAny(client, "musictest.mp3");
		PrintToChat(client, "Music Test.");
	}
	return Plugin_Continue;
}
__________________
alphaearth 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 23:51.


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