mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-08 05:33:21 +00:00
Add stagger cmd
This commit is contained in:
parent
aa4eab2a76
commit
a267dfc0e8
3 changed files with 30 additions and 0 deletions
Binary file not shown.
|
@ -553,3 +553,32 @@ public Action Command_BotsAttack(int client, int args) {
|
|||
}
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
public Action Command_Stagger(int client, int args) {
|
||||
if(args > 0) {
|
||||
static char arg1[32];
|
||||
GetCmdArg(1, arg1, sizeof(arg1));
|
||||
|
||||
int target_list[1], target_count;
|
||||
static char target_name[MAX_TARGET_LENGTH];
|
||||
bool tn_is_ml;
|
||||
if ((target_count = ProcessTargetString(
|
||||
arg1,
|
||||
client,
|
||||
target_list,
|
||||
1,
|
||||
COMMAND_FILTER_ALIVE | COMMAND_FILTER_NO_MULTI,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
tn_is_ml)) <= 0
|
||||
) {
|
||||
/* This function replies to the admin with a failure message */
|
||||
ReplyToTargetError(client, target_count);
|
||||
return Plugin_Handled;
|
||||
}
|
||||
L4D_StaggerPlayer(target_list[0], target_list[0], NULL_VECTOR);
|
||||
} else {
|
||||
ReplyToCommand(client, "syntax: sm_stagger <target player>");
|
||||
}
|
||||
return Plugin_Handled;
|
||||
}
|
|
@ -85,6 +85,7 @@ public void OnPluginStart() {
|
|||
RegAdminCmd("sm_ftc", Command_ApplyComboTrolls, ADMFLAG_KICK, "Applies predefined combinations of trolls");
|
||||
RegAdminCmd("sm_witch_attack", Command_WitchAttack, ADMFLAG_CHEATS, "Makes all witches target a player");
|
||||
RegAdminCmd("sm_insta", Command_InstaSpecial, ADMFLAG_KICK, "Spawns a special that targets them, close to them.");
|
||||
RegAdminCmd("sm_stagger", Command_Stagger, ADMFLAG_KICK, "Stagger a player");
|
||||
RegAdminCmd("sm_instaface", Command_InstaSpecialFace, ADMFLAG_KICK, "Spawns a special that targets them, right in their face.");
|
||||
RegAdminCmd("sm_inface", Command_InstaSpecialFace, ADMFLAG_KICK, "Spawns a special that targets them, right in their face.");
|
||||
RegAdminCmd("sm_bots_attack", Command_BotsAttack, ADMFLAG_CHEATS, "Instructs all bots to attack a player until they have X health.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue