TeamUpgradeEraPurchased
Fires when a Team Upgrade Era is purchased from the Team Upgrade Shop.
Example usage:
Events.TeamUpgradeEraPurchased(function(event)
-- Only proceed if the Diamond Era was purchased
if (event.upgrade == TeamUpgradeEraType.DIAMOND_ERA) then
local teamPlayers = event.team:getInGamePlayers()
-- Loop over all players in the team that received the upgrade
for i, player in pairs(teamPlayers) do
-- Give each team player a Diamond Scythe item
InventoryService.giveItem(player, ItemType.DIAMOND_SCYTHE, 1)
end
end
end)
Parameters
player: Player
The player who purchased the team upgrade.
team: Team
The team that received the team upgrade.
era: TeamUpgradeEraType
The team upgrade era purchased by the player.
Last updated