phara1 / advanced-ff-cs2

Advanced Friendly Fire - CS2
GNU General Public License v3.0
11 stars 0 forks source link

[REQ] Level punishment system [Implemented] #5

Closed crashzk closed 3 weeks ago

crashzk commented 1 month ago

Player performed friendly fire 3 levels at once, molotov base and killed everyone on the team. He was banned straight away.

My configuration:

// This configuration was automatically generated by CounterStrikeSharp for plugin 'advanced_friendlyfire', at 2024/09/27 08:43:53
{
  "Enable/Disable Advanced Friendly Fire": true,
  "Enable/Disable Punishments": true,
  "Damage Inflictors": [
    "inferno",
    "hegrenade_projectile",
    "flashbang_projectile",
    "smokegrenade_projectile",
    "decoy_projectile",
    "planted_c4"
  ],
  "Warning #1 Required Team Damage (HP Metrics)": 150,
  "Warning #1 Chat message": "Evite fogo amigo, ou você será punido! Aviso de fogo amigo [1/3]",
  "Warning #1 Punishment": "css_psay {Player} \u0022Aviso de fogo amigo [1/3]\u0022",
  "Warning #2 Required Team Damage (HP Metrics)": 300,
  "Warning #2 Chat message": "Você foi kickado por causar dano excessivo aos seus companheiros de equipe!",
  "Warning #2 Punishment": "css_kick {Player} \u0022Aviso de fogo amigo [2/3]\u0022",
  "Warning #3 Required Team Damage (HP Metrics)": 500,
  "Warning #3 Chat message": "Você foi banido por causar dano excessivo aos seus companheiros de equipe!",
  "Warning #3 Punishment": "css_ban {Player} 30 \u0022Aviso de fogo amigo [3/3]\u0022",
  "ConfigVersion": 1
}

As he did more than 500 damage he was directly banned, but it would be interesting for him to go level by level, even adding up all the damage he did.

In other words, to count damage above 150 he must receive the first punishment, only then count the punishment of 300 and so on.

crashzk commented 1 month ago

And of course, kind of leave the damage he's already done saved in cache, only counting it back as the first punishment if he changes maps. This prevents it from continuing with the level of punishment where it left off when changing maps.

phara1 commented 1 month ago

And of course, kind of leave the damage he's already done saved in cache, only counting it back as the first punishment if he changes maps. This prevents it from continuing with the level of punishment where it left off when changing maps.

so basically if player does x amount of damage, they receive the 1st punishment after that, will reset the counter and if he does another y amount of damage to receive the 2nd punishment and so on?

and after map change, the counter resets so he won't be punished for the damage he did in the previous map, right?

crashzk commented 1 month ago

And of course, kind of leave the damage he's already done saved in cache, only counting it back as the first punishment if he changes maps. This prevents it from continuing with the level of punishment where it left off when changing maps.

so basically if player does x amount of damage, they receive the 1st punishment after that, will reset the counter and if he does another y amount of damage to receive the 2nd punishment and so on?

and after map change, the counter resets so he won't be punished for the damage he did in the previous map, right?

Exactly. :)

crashzk commented 1 month ago

Yes, enjoying it. Some way to ensure that when the match ends, friendly damage caused is not counted.

This is because the player who was banned due to friendly fire did this when the match was over, that is, we won the game and everyone was stopped for that time before changing the map and with that he made the molotov before time froze. Anyway, when the game ends and everyone is stuck, there is a way to make the plugin not count damage, even when switching teams, half time.

phara1 commented 3 weeks ago

Implemented https://github.com/phara1/advanced-ff-cs2/releases/tag/v1.1.3