Approver: Exolent[jNr] (178)
Join Date: Sep 2007
Location: Flatland, USA
Bot Apology for TK
Many servers that I play on have friendly fire turned on and many also "require" an apology for team kills. If you have bots, why not let them set a good example?
This plugin will make a bot apologize, in chat, for it's team kills.
amx_bot_apology <1|0> - Turn plugin on or off.
amx_bot_apology_prob <0-100> - The probability that the bot will apologize for a TK.
amx_bot_apology_method <0-100> - Probability that team chat will be used. (0 -> public, 100 -> team)
amx_bot_apology_delay <#> - The time between the TK and the apology (from last TK if there was another within the delay time of the previous TK).
Note: Cvar changes take effect on map change.
I only play Day of Defeat but I would assume that it would work on other Mods as it is very simple with no Mod specific code.
Thanks for feeback and suggestions:
- Removed unnecessary(?) condition checks.
- Changed Death detection from Ham Hook to Event Hook.
- Added is_bot global array instead of is_user_bot (set on putinserver).
- Remove task on disconnect.
- Rearranged some code.
- Changed method for assigning is_bot values.
- Changed on/off cvar usage.
- Added cvar to allow using team chat.
- Added bot_apology.ini for apology phrases.
- Changed "chance" to a macro.
- Using copy for string assignment.
Last edited by fysiks; 02-17-2016 at 19:07.
Reason: Updated coding style.