Quote:
Originally Posted by arne1288
When I am looking around, I only see the "victimisbot" boolean mentioned in L4D2 related plugins.
If this isn't for L4D2, I suggest trying something like (based on the code above):
PHP Code:
public Action OnPlayerDeathPre(Event event, const char[] name, bool dontBroadcast) { int victimId = event.GetInt("userid");
if (IsFakeClient(victimId)) { return Plugin_Handled; } return Plugin_Continue; }
I cannot guarantee that it will work for you, it's simply based on a quick look at the events and their parameters listed on Generic Source Events, as well as Counter-Strike: Global Offensive Events.
Another time, it would also be useful if you were providing all relevant details, including what game, and so on...
|
Thanks for your response!
Sorry I forgot to mention the plugin is for my CSGO server.
I tried your plugin but bot kills are still counted. But there are messages about the plugin printed into the servers console so it looks like you are on the right track!
Those are the messages printed to the servers console after killing some bots:
Code:
L 04/02/2018 - 20:55:13: [SM] Exception reported: Client 9 is not connected
L 04/02/2018 - 20:55:13: [SM] Blaming: thehunt_killfix.smx
L 04/02/2018 - 20:55:13: [SM] Call stack trace:
L 04/02/2018 - 20:55:13: [SM] [0] IsFakeClient
L 04/02/2018 - 20:55:13: [SM] [1] Line 21, /home/groups/sourcemod/upload_tmp/phpupjCbd.sp::OnPlayerDeathPre
L 04/02/2018 - 20:55:30: [SM] Exception reported: Client 7 is not connected
L 04/02/2018 - 20:55:30: [SM] Blaming: thehunt_killfix.smx
L 04/02/2018 - 20:55:30: [SM] Call stack trace:
L 04/02/2018 - 20:55:30: [SM] [0] IsFakeClient
L 04/02/2018 - 20:55:30: [SM] [1] Line 21, /home/groups/sourcemod/upload_tmp/phpupjCbd.sp::OnPlayerDeathPre
L 04/02/2018 - 20:56:29: [SM] Exception reported: Client 10 is not connected
L 04/02/2018 - 20:56:42: [SM] Blaming: thehunt_killfix.smx
L 04/02/2018 - 20:56:42: [SM] Call stack trace:
L 04/02/2018 - 20:56:42: [SM] [0] IsFakeClient
L 04/02/2018 - 20:56:42: [SM] [1] Line 21, /home/groups/sourcemod/upload_tmp/phpupjCbd.sp::OnPlayerDeathPre
L 04/02/2018 - 20:56:42: [SM] Exception reported: Script execution timed out
Also it looks like the server got a bit laggy after installing the plugin.
Would be awesome if you could take at it again :3
I'm really sorry for posting about this twice - won't happen again.
EDIT: Just restarted the server and it really looks like the server started lagging with this plugin. But i also recognized that if I kill a bot sometimes there's no death message at the top right of the screen and no message printed to the server's console but the kill is counted anyways. As I said this only happens sometimes, kinda weird.
Thanks already,
hazetank