Quote:
Originally Posted by Mitchell
I think the mistake was not converting the userId to client index though.
|
I believe you're right. I also had the userid to client part in one of my many notepads, seems like I'm spreading things all over these days...
Quote:
Originally Posted by Tank_in_Pink
Do you know how to fix it?
It would be so great to get this plugin running
|
Try with this one instead:
PHP Code:
public Action OnPlayerDeathPre(Event event, const char[] name, bool dontBroadcast)
{
int victim = GetClientOfUserId(event.GetInt("userid"));
if (IsClientInGame(victim) && IsFakeClient(victim))
{
return Plugin_Handled;
}
return Plugin_Continue;
}
If that one doesn't work either, I'd probably lean towards the method you previously mentioned, by decrementing the kills of the player if the victim is a bot instead.
I simply tried to fix the code that
cravenge shared above, basing my shared code above 100% on that one.
__________________