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

@@ -10,6 +10,7 @@ Init()
if (!IsMultiplayerMode())
{
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);
@@ -44,6 +45,16 @@ ListPowerupsCommand(args)
}
}
ListPerksCommand(args)
{
error = self thread ListPerks();
if (IsDefined(error))
{
return error;
}
}
/* Logic section */
@@ -145,4 +156,9 @@ ListAttachments(weaponName)
ListPowerups()
{
self thread TellPlayer(GetAvailablePowerups(), 2);
}
ListPerks()
{
self thread TellPlayer(GetAvailablePerks(), 2);
}