Implemented request amb684 for sm_play.
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401218
This commit is contained in:
parent
c01022585b
commit
8e5d8881df
@ -41,6 +41,35 @@ public OnPluginStart()
|
||||
RegAdminCmd("sm_burn", Command_Burn, ADMFLAG_SLAY, "sm_burn <#userid|name> [time]");
|
||||
RegAdminCmd("sm_slap", Command_Slap, ADMFLAG_SLAY, "sm_slap <#userid|name> [damage]");
|
||||
RegAdminCmd("sm_slay", Command_Slay, ADMFLAG_SLAY, "sm_slay <#userid|name>");
|
||||
RegAdminCmd("sm_play", Command_Play, ADMFLAG_GENERIC, "sm_play <#userid|name> [filename]");
|
||||
}
|
||||
|
||||
public Action:Command_Play(client, args)
|
||||
{
|
||||
if(args < 2)
|
||||
{
|
||||
ReplyToCommand(client, "[SM] Usage: sm_burn <#userid|name> [sound]");
|
||||
}
|
||||
|
||||
decl String:Arg[65];
|
||||
GetCmdArg(1, Arg, sizeof(Arg));
|
||||
|
||||
new target = FindTarget(client, Arg);
|
||||
if (target == -1)
|
||||
{
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
decl String:SoundFile[PLATFORM_MAX_PATH];
|
||||
GetCmdArg(2, SoundFile, sizeof(SoundFile));
|
||||
GetClientName(target, Arg, sizeof(Arg));
|
||||
|
||||
ShowActivity(client, "%t", "Played Sound", Arg);
|
||||
LogMessage("\"%L\" played sound on \"%L\" (file \"%s\")", client, target, SoundFile);
|
||||
|
||||
ClientCommand(target, "playgamesound %s", SoundFile);
|
||||
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public Action:Command_Burn(client, args)
|
||||
|
@ -72,6 +72,12 @@
|
||||
"en" "Slayed player '{1}'"
|
||||
}
|
||||
|
||||
"Played Sound"
|
||||
{
|
||||
"#format" "{1:s}"
|
||||
"en" "Played sound on player '{1}'"
|
||||
}
|
||||
|
||||
"Unable to find cvar"
|
||||
{
|
||||
"#format" "{1:s}"
|
||||
|
Loading…
Reference in New Issue
Block a user