View Single Post
Plugin Info:     Modification:          Category:          Approver:   Exolent[jNr] (178)
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-13-2009 , 00:38   Bot Apology for TK
Reply With Quote #1

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?

Description:
This plugin will make a bot apologize, in chat, for it's team kills.

Cvars:
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:
- Vet
- Arkshine
- Exolent

Changelog:

v1.3
- Removed unnecessary(?) condition checks.
- Changed Death detection from Ham Hook to Event Hook.

v1.4
- Added is_bot global array instead of is_user_bot (set on putinserver).
- Remove task on disconnect.
- Rearranged some code.

v1.5
- Changed method for assigning is_bot values.
- Changed on/off cvar usage.

v2.0
- Added cvar to allow using team chat.

v3.0
- Added bot_apology.ini for apology phrases.
- Changed "chance" to a macro.
- Using copy for string assignment.
Attached Files
File Type: sma Get Plugin or Get Source (amx_bot_apology.sma - 1445 views - 3.1 KB)
File Type: ini bot_apology.ini (213 Bytes, 1444 views)

Last edited by fysiks; 02-17-2016 at 19:07. Reason: Updated coding style.
fysiks is offline