mirror of
https://github.com/Resxt/Plutonium-T6-Scripts.git
synced 2026-10-02 10:19:50 +00:00
chat_commands 1.1.5
Added PowerupDoesNotExistError Added GetAvailablePowerups util function Added IsValidPowerup util function
This commit is contained in:
1 parent
6663279c21
commit
fb57ea3c4e
1 file changed
+25
@@ -514,6 +514,11 @@ NotEnoughPointsError()
|
||||
return array("You don't have enough points to do that");
|
||||
}
|
||||
|
||||
PowerupDoesNotExistError(powerupName)
|
||||
{
|
||||
return array("The powerup " + powerupName + " doesn't exist or isn't available on this map");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Utils section */
|
||||
@@ -744,4 +749,24 @@ IsValidWeapon(weaponName)
|
||||
weaponIndex = getbaseweaponitemindex(weaponName);
|
||||
|
||||
return weaponIndex != 0;
|
||||
}
|
||||
|
||||
GetAvailablePowerups()
|
||||
{
|
||||
powerups = [];
|
||||
|
||||
foreach (powerup in GetArrayKeys(level.zombie_powerups))
|
||||
{
|
||||
if (powerup != "insta_kill_ug")
|
||||
{
|
||||
powerups = AddElementToArray(powerups, powerup);
|
||||
}
|
||||
}
|
||||
|
||||
return powerups;
|
||||
}
|
||||
|
||||
IsValidPowerup(powerupName)
|
||||
{
|
||||
return IsInArray(GetAvailablePowerups(), powerupName);
|
||||
}
|
||||
Reference in new issue
Block a user