Raised This Month: $ Target: $400
 0% 

[SOLVED]Killed self with player?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
powwoww
BANNED
Join Date: Oct 2008
Old 11-27-2009 , 02:25   [SOLVED]Killed self with player?
Reply With Quote #1

I got the problem last week:
The normal killing events show as suicide sometimes(its not always happening)
The client console will print: XXX killed self with player (with suicide hud icon)
Server Log: XXX committed suicide with "player" (world)

Did anyone see this before, plz help ,thanks.
Debug code below, no special weapons( knife,m4a1.etc...)

#include <amxmodx>
#include <hamsandwich>
new logfilename[64]
public plugin_init(){
register_plugin("[DEBUG] Kill Event", "0.1", "Flea")

register_event("DeathMsg", "evDeath", "a")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", 1)
get_time("kills%m%d.txt", logfilename, 63)
}
public fw_PlayerKilled(victim, attacker, shouldgib){
new name[32],name1[32]
if(is_user_alive(attacker)) get_user_name(attacker,name,31)
else name="-Suicide-"
get_user_name(victim,name1,31)
log_to_file(logfilename, "[Pre]%s Kill %s", name,name1)
}
public fw_PlayerKilled_Post(victim, attacker, shouldgib){
new name[32],name1[32]
if(is_user_alive(attacker)) get_user_name(attacker,name,31)
else name="-Suicide-"
get_user_name(victim,name1,31)
log_to_file(logfilename, "[post]%s Killed %s", name,name1)
}
public evDeath(){//击杀事件
new kr = read_data(1),vm = read_data(2),name[32],name1[32]
get_user_name(vm,name1,31)
if(!is_user_alive(kr)) log_to_file(logfilename, "[Ev]%s Suicide %d!!!!!!!", name1,kr)
else{
get_user_name(kr,name,31)
log_to_file(logfilename, "[Ev]%s Kill %s", name,name1)
}
}

LOGFILE:
L 11/28/2009 - 128:23: [Pre]wtl Kill Candy*Stars>l.w<W.w //Normal
L 11/28/2009 - 128:23: [Ev]Candy*Stars>l.w<W.w Suicide 0!!!!!!! //WTF ?
L 11/28/2009 - 128:23: [post]wtl Killed Candy*Stars>l.w<W.w //Normal

Now I've got it myself:
set_pev(id,pev_flags,FL_DUCKING,1)
This code forces a player to duck to prevent from being blocked, but the problem is that after using this, when this player kills someone, it will cause the bug.

Last edited by powwoww; 11-29-2009 at 03:51.
powwoww is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode