mirror of
https://github.com/Resxt/Plutonium-T6-Scripts.git
synced 2025-04-19 13:42:54 +00:00
chat_commands 1.1.5
Added PowerupDoesNotExistError Added GetAvailablePowerups util function Added IsValidPowerup util function
This commit is contained in:
parent
6663279c21
commit
fb57ea3c4e
@ -514,6 +514,11 @@ NotEnoughPointsError()
|
|||||||
return array("You don't have enough points to do that");
|
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 */
|
/* Utils section */
|
||||||
@ -744,4 +749,24 @@ IsValidWeapon(weaponName)
|
|||||||
weaponIndex = getbaseweaponitemindex(weaponName);
|
weaponIndex = getbaseweaponitemindex(weaponName);
|
||||||
|
|
||||||
return weaponIndex != 0;
|
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);
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user