chat_command_info 1.1.0

Added listpowerups command to list available powerups in zombies (only lists powerups available on the map)
This commit is contained in:
Resxt 2023-10-27 13:53:34 +02:00
parent ea309f9d28
commit 6663279c21
2 changed files with 22 additions and 0 deletions

View File

@ -160,11 +160,13 @@ Toggles whether the targeted player is in god mode (invincible) or not.
- List available weapons - List available weapons
- List available attachments (MP only) - List available attachments (MP only)
- List available powerups (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 |
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

@ -7,6 +7,11 @@ Init()
CreateCommand(level.chat_commands["ports"], "listattachments", "function", ::ListAttachmentsCommand, 2); CreateCommand(level.chat_commands["ports"], "listattachments", "function", ::ListAttachmentsCommand, 2);
} }
if (!IsMultiplayerMode())
{
CreateCommand(level.chat_commands["ports"], "listpowerups", "function", ::ListPowerupsCommand, 2);
}
CreateCommand(level.chat_commands["ports"], "listweapons", "function", ::ListWeaponsCommand, 2); CreateCommand(level.chat_commands["ports"], "listweapons", "function", ::ListWeaponsCommand, 2);
} }
@ -29,6 +34,16 @@ ListAttachmentsCommand(args)
} }
} }
ListPowerupsCommand(args)
{
error = self thread ListPowerups();
if (IsDefined(error))
{
return error;
}
}
/* Logic section */ /* Logic section */
@ -126,3 +141,8 @@ ListAttachments(weaponName)
} }
} }
} }
ListPowerups()
{
self thread TellPlayer(GetAvailablePowerups(), 2);
}