View Single Post
Walgrim
AlliedModders Donor
Join Date: Dec 2015
Location: France
Old 11-17-2017 , 14:33   Re: [ZR] Is there a way to fix this ?
Reply With Quote #9

Hoi, I did that, hope it will help
PHP Code:
#include <sourcemod>
#include <sdkhooks>

public OnPluginStart() {
  
HookEvent("player_death"EventPlayerDeathEventHookMode_Pre);
}

public 
Action EventPlayerDeath(Event event, const char[] namebool dontBroadcast) {
  
char buffer[255];
  if (
GetEventString(event"weapon"buffersizeof(buffer)) && buffer[255] > 0) {
    if (
buffer[0]) {
      
SetEventString(event"weapon"buffer[0]);
    }
    else {
      return 
Plugin_Handled;
    }
  }
  return 
Plugin_Continue;

Oh and if I did some mistakes, feel free to correct it :^)
EDIT: I'm not sure if this will work (since I can't reproduce the exact situtation, but it can help (hope so))

Last edited by Walgrim; 11-18-2017 at 02:19.
Walgrim is offline