Raised This Month: $ Target: $400
 0% 

[SOLVED]Killed self with player?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-28-2009 , 15:12   Re: Killed self with player?
Reply With Quote #1

Your code is weird. I'm not sure to understand what you are trying to do.
__________________
Arkshine is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 11-28-2009 , 16:15   Re: Killed self with player?
Reply With Quote #2

He's getting suicide with "player" console messages and he tried to debug the info...

It's your server, are you sure no other plugins or metamod addons can affect this ? remove them all and try again just to be sure... it can be a plugin hooking deathmsg and modifying it so that the killer is himself and weapon is "player" :-?? ... oooor a plugin that allows players to kill with alternate modes... like a player kills another player by dropping in his head, or something... I dunno what you have there.

I tried the debug code (altered a bit) and works just fine:
Code:
// killing a bot:
[Pre]Digi Kill [POD]Pissed Off (97)
[Ev]Digi Kill [POD]Pissed Off (97)
[post]Digi Killed [POD]Pissed Off (97)
// then a kill command:
[Pre](suicide) Kill Digi
[Ev](suicide) Kill Digi
[post](suicide) Killed Digi
PHP Code:
#include <amxmodx>
#include <hamsandwich>
 
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)
}
 
public 
fw_PlayerKilled(victimattackershouldgib)
{
    new 
name[32],name1[32]
 
    
get_user_name(victim,name1,31)
 
    if(
is_user_alive(attacker))
        
get_user_name(attacker,name,31)
    else
        
copy(name31"(suicide)")
 
    
server_print("[Pre]%s Kill %s"name,name1)
}
 
public 
fw_PlayerKilled_Post(victimattackershouldgib)
{
    new 
name[32],name1[32]
 
    
get_user_name(victim,name1,31)
 
    if(
is_user_alive(attacker))
        
get_user_name(attacker,name,31)
    else
        
copy(name31"(suicide)")
 
    
server_print("[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))
        
get_user_name(kr,name,31)
    else
        
copy(name31"(suicide)")
 
    
server_print("[Ev]%s Kill %s"name,name1)

__________________

Last edited by Hunter-Digital; 11-28-2009 at 16:22.
Hunter-Digital is offline
Reply



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