mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-19 20:52:54 +00:00
chat_command_wallhack 1.0.0
This commit is contained in:
parent
18938c2487
commit
108b06962a
@ -89,6 +89,15 @@ Prints the server rules in the player's chat.
|
|||||||
Arguments expected: none.
|
Arguments expected: none.
|
||||||
Example: `!rules`
|
Example: `!rules`
|
||||||
|
|
||||||
|
## chat_command_wallhack.gsc
|
||||||
|
|
||||||
|
Toggles wallhack (red boxes) on the targeted player
|
||||||
|
|
||||||
|
| Examples |
|
||||||
|
|---|
|
||||||
|
| `!wallhack me` |
|
||||||
|
| `!wallhack Resxt` |
|
||||||
|
|
||||||
## chat_commands.gsc
|
## chat_commands.gsc
|
||||||
|
|
||||||
The core script that holds the configuration, runs all the chat logic and holds utils function that are shared between all the `chat_command` scripts.
|
The core script that holds the configuration, runs all the chat logic and holds utils function that are shared between all the `chat_command` scripts.
|
||||||
|
79
chat_commands/chat_command_wallhack.gsc
Normal file
79
chat_commands/chat_command_wallhack.gsc
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
#include scripts\chat_commands;
|
||||||
|
|
||||||
|
Init()
|
||||||
|
{
|
||||||
|
CreateCommand(level.commands_servers_ports, "wallhack", "function", ::WallhackCommand, ["default_help_one_player"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Command section */
|
||||||
|
|
||||||
|
WallhackCommand(args)
|
||||||
|
{
|
||||||
|
if (args.size < 1)
|
||||||
|
{
|
||||||
|
return NotEnoughArgsError(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
error = ToggleWallhack(args[0]);
|
||||||
|
|
||||||
|
if (IsDefined(error))
|
||||||
|
{
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Logic section */
|
||||||
|
|
||||||
|
ToggleWallhack(playerName)
|
||||||
|
{
|
||||||
|
player = FindPlayerByName(playerName);
|
||||||
|
|
||||||
|
if (!IsDefined(player))
|
||||||
|
{
|
||||||
|
return PlayerDoesNotExistError(playerName);
|
||||||
|
}
|
||||||
|
|
||||||
|
commandName = "wallhack";
|
||||||
|
|
||||||
|
ToggleStatus(commandName, "Wallhack", player);
|
||||||
|
|
||||||
|
if (GetStatus(commandName, player))
|
||||||
|
{
|
||||||
|
player DoWallhack(true);
|
||||||
|
player thread ThreadWallhack();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player DoWallhack(false);
|
||||||
|
player notify("chat_commands_wallhack_off");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ThreadWallhack()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
self endon("chat_commands_wallhack_off");
|
||||||
|
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
self waittill("spawned_player");
|
||||||
|
|
||||||
|
DoWallhack(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DoWallhack(enabled)
|
||||||
|
{
|
||||||
|
if (enabled)
|
||||||
|
{
|
||||||
|
self ThermalVisionFOFOverlayOn();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self ThermalVisionFOFOverlayOff();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user