chat_command_info 1.2.0

Added listperks command
This commit is contained in:
Resxt 2023-10-28 15:12:58 +02:00
parent d0776fde3f
commit e4c8f29fb9
2 changed files with 20 additions and 2 deletions

View File

@ -156,17 +156,19 @@ Toggles whether the targeted player is in god mode (invincible) or not.
## chat_command_info.gsc ## chat_command_info.gsc
2 related commands in one file: 4 related commands in one file:
- List available weapons - List available weapons
- List available attachments (MP only) - List available attachments (MP only)
- List available powerups (ZM only) - List available powerups (ZM only)
- List available perks (ZM only)
| Name | Description | Arguments expected | Example | Permission level | | Name | Description | Arguments expected | Example | Permission level |
|---|---|---|---|---| |---|---|---|---|---|
| listweapons | Prints all the available weapons. No argument prints code names, any argument will print display/human readable names instead | (1) optional, any text | `!listweapons` | 2 | | listweapons | Prints all the available weapons. No argument prints code names, any argument will print display/human readable names instead | (1) optional, any text | `!listweapons` | 2 |
| listattachments | Prints all the available attachments for that weapon. No argument prints available attachments for the weapon you're holding, a valid weapon codename as argument will print this weapon's available attachments instead | (1) optional, valid weapon codename | `!listattachments dsr50_mp` | 2 | | listattachments | Prints all the available attachments for that weapon. No argument prints available attachments for the weapon you're holding, a valid weapon codename as argument will print this weapon's available attachments instead | (1) optional, valid weapon codename | `!listattachments dsr50_mp` | 2 |
| listattachments | Prints all the available powerups in the map you're currently playing on | | `!listpowerups` | 2 | | listpowerups | Prints all the available powerups in the map you're currently playing on | | `!listpowerups` | 2 |
| listperks | Prints all the available perks in the map you're currently playing on | | `!listperks` | 2 |
You can check [this](https://forum.plutonium.pw/topic/1909/resource-stat-modification-checks-other-structures) to get weapon/attachment names from your browser instead. You can check [this](https://forum.plutonium.pw/topic/1909/resource-stat-modification-checks-other-structures) to get weapon/attachment names from your browser instead.

View File

@ -10,6 +10,7 @@ Init()
if (!IsMultiplayerMode()) if (!IsMultiplayerMode())
{ {
CreateCommand(level.chat_commands["ports"], "listpowerups", "function", ::ListPowerupsCommand, 2); CreateCommand(level.chat_commands["ports"], "listpowerups", "function", ::ListPowerupsCommand, 2);
CreateCommand(level.chat_commands["ports"], "listperks", "function", ::ListPerksCommand, 2);
} }
CreateCommand(level.chat_commands["ports"], "listweapons", "function", ::ListWeaponsCommand, 2); CreateCommand(level.chat_commands["ports"], "listweapons", "function", ::ListWeaponsCommand, 2);
@ -44,6 +45,16 @@ ListPowerupsCommand(args)
} }
} }
ListPerksCommand(args)
{
error = self thread ListPerks();
if (IsDefined(error))
{
return error;
}
}
/* Logic section */ /* Logic section */
@ -146,3 +157,8 @@ ListPowerups()
{ {
self thread TellPlayer(GetAvailablePowerups(), 2); self thread TellPlayer(GetAvailablePowerups(), 2);
} }
ListPerks()
{
self thread TellPlayer(GetAvailablePerks(), 2);
}