mirror of
https://github.com/Resxt/Plutonium-T6-Scripts.git
synced 2025-04-19 13:42:54 +00:00
chat_command_no_target 1.0.0
This commit is contained in:
parent
525d50dfc0
commit
d8ffda994a
@ -2,6 +2,23 @@
|
|||||||
|
|
||||||
These scripts go in `scripts\zm`
|
These scripts go in `scripts\zm`
|
||||||
|
|
||||||
|
## chat_command_no_target.gsc
|
||||||
|
|
||||||
|
Toggles whether the targeted player is in no target mode (invisible to zombies) or not.
|
||||||
|
|
||||||
|
| # | Argument | Mandatory |
|
||||||
|
|---|---|---|
|
||||||
|
| 1 | The name of the player to toggle no target for | :white_check_mark: |
|
||||||
|
|
||||||
|
| Examples |
|
||||||
|
|---|
|
||||||
|
| `!notarget me` |
|
||||||
|
| `!notarget Resxt` |
|
||||||
|
|
||||||
|
| Permission level |
|
||||||
|
|---|
|
||||||
|
| 3 |
|
||||||
|
|
||||||
## chat_command_points.gsc
|
## chat_command_points.gsc
|
||||||
|
|
||||||
4 related commands in one file:
|
4 related commands in one file:
|
||||||
|
45
chat_commands/zm/chat_command_no_target.gsc
Normal file
45
chat_commands/zm/chat_command_no_target.gsc
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#include scripts\chat_commands;
|
||||||
|
|
||||||
|
Init()
|
||||||
|
{
|
||||||
|
CreateCommand(level.chat_commands["ports"], "notarget", "function", ::NoTargetCommand, 3, array("default_help_one_player"), array("ignoreme", "ignore"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Command section */
|
||||||
|
|
||||||
|
NoTargetCommand(args)
|
||||||
|
{
|
||||||
|
if (args.size < 1)
|
||||||
|
{
|
||||||
|
return NotEnoughArgsError(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
error = ToggleNoTarget(args[0]);
|
||||||
|
|
||||||
|
if (IsDefined(error))
|
||||||
|
{
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Logic section */
|
||||||
|
|
||||||
|
ToggleNoTarget(playerName)
|
||||||
|
{
|
||||||
|
player = FindPlayerByName(playerName);
|
||||||
|
|
||||||
|
if (!IsDefined(player))
|
||||||
|
{
|
||||||
|
return PlayerDoesNotExistError(playerName);
|
||||||
|
}
|
||||||
|
|
||||||
|
commandName = "notarget";
|
||||||
|
|
||||||
|
ToggleStatus(commandName, "No Target", player);
|
||||||
|
|
||||||
|
player.ignoreme = GetStatus(commandName, player);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user