mirror of
https://github.com/Resxt/Plutonium-T6-Scripts.git
synced 2025-04-19 21:52:54 +00:00
45 lines
755 B
Plaintext
45 lines
755 B
Plaintext
#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);
|
|
} |