tres
Well-Known Member
- Joined
- Feb 10, 2020
- Messages
- 47
I want to suggest this to thwart one of the ways that Freedays can exploit their free day.
This can also apply to non-freedays, as if they heal a rebeller, they will get rebel status.
NOTE: This goes off the latest update of the old TF2Jail repo. I also don't have much experience with the TF2Jail plugin and sourcemod, so there might be some errors in this.
File: TF2Jail.sp Link
PROS:
Be able to stop freedays from healing rebellers and not getting rebel status.
Mark people who healed freedays
CONS:
Medics might get rebel status when a prisoner decides to turn to a rebeller before they realize it.
Medics might not get rebel status if they keep a continuous stream of healing. (Since probably the event fires after someone is healed. And on the SourceMod Event Wiki, player_healed does not return how much time they were healed.)
Code:
This would be near //Hooked Events on line 468 of TF2Jail.sp
I would suggest to put this near OnPlayerSpawn function. (Around line 1507) on TF2Jail.sp. Though I don't think this would have any effect onto it.
Also, I had a talk with Semicolon on Discord and he said this is done automatically and in the script itself. Is there a possibility in migrating to TF2 Jail Redux? It does have missing features but I hope someone can copy and paste them in.
TF2 Jail Redux Repo
Poll closes in 7 days.
This can also apply to non-freedays, as if they heal a rebeller, they will get rebel status.
NOTE: This goes off the latest update of the old TF2Jail repo. I also don't have much experience with the TF2Jail plugin and sourcemod, so there might be some errors in this.
File: TF2Jail.sp Link
PROS:
Be able to stop freedays from healing rebellers and not getting rebel status.
Mark people who healed freedays
CONS:
Medics might get rebel status when a prisoner decides to turn to a rebeller before they realize it.
Medics might not get rebel status if they keep a continuous stream of healing. (Since probably the event fires after someone is healed. And on the SourceMod Event Wiki, player_healed does not return how much time they were healed.)
Code:
C++:
HookEvent("player_healed", OnHeal);
C++:
public void OnHeal(Handle hEvent, char[] sName, bool bBroadcast)
{
int patient = GetClientOfUserId(GetEventInt(hEvent, "patient"));
int healer = GetClientOfUserId(GetEventInt(hEvent, "healer"));
if(bIsRebel[patient])
{
if(bIsFreeday[healer])
{
RemoveFreeday(healer);
}
MarkRebel(healer);
}
}
Also, I had a talk with Semicolon on Discord and he said this is done automatically and in the script itself. Is there a possibility in migrating to TF2 Jail Redux? It does have missing features but I hope someone can copy and paste them in.
TF2 Jail Redux Repo
Poll closes in 7 days.