Bypass the limits

Hey there i noticed on my server that some players would have more Turrets than my max 25 per base/tc but you can easely bypass that limit by just removing the TC build more and putting it back, would it be a way to still have the Limit enforced when there's no TC ?

Only as part of the global limit. So if you wanted to, you could limit a player to 25 in total, then they could not put more than 25 turrets down, but as a global limit, it ignores TC, and checks how many of the entity in question are owned by the player across the map. But then their next base is defenceless, so they'd have to spread their "turret allowance" more thinly, or have fewer bases.

Sadly I can't check a TC limit against an item that no longer exists.

Yeah i thought that you couldn't check an non existing TC haha

The issue is that i don't necessarly want to limit the Global for Turrets so they can make multiple bases with 25 Turrets max, so if i put a high limit it would still bring the same issue as they still could put all of them in one base :/

Thanks for the quick responce tho

I need to think of an alternative for that 



Merged post

I maybe would have another question, coud this plugin scan for entities that are in the limits and remove the excess of them ?

I mean not all the time but maybe just when placing a TC for example 

Hmmm.

I think it may be possible. 

OnCupboardAuthorize(BuildingPrivlidge privilege, BasePlayer player)

Check the building for entities on the list, and destroy the excess. There are only 2 issues with this:

1. It wouldn't be nice and kill the last few placed, or some such order, it would count them in whatever order it pleased and destroy through the list till there were only the set number left.

2. I don't know if I am good enough to code it.

 

Thanks for your reply, i'll try to put a lil plugin down that stops you from placing Turrets when there's no TC nearby, as my server is really fast decay that would do the trick :D