Raised This Month: $ Target: $400
 0% 

Shows 2 deaths


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 08-27-2005 , 03:22   Shows 2 deaths
Reply With Quote #1

Here's what I use to handle the kill ( KleeneX's, but modified by me ):
Code:
stock log_kill(killer, victim, weapon[],headshot) {     user_silentkill(victim)     make_deathmsg(killer,victim,headshot,weapon)         if(get_user_team(killer)!=get_user_team(victim))         set_user_frags(killer,get_user_frags(killer) +1);     if(get_user_team(killer)==get_user_team(victim))         set_user_frags(killer,get_user_frags(killer) -1);             message_begin(MSG_BROADCAST,get_user_msgid("ScoreInfo"));     write_byte(killer);     write_short(get_user_frags(killer));     write_short(cs_get_user_deaths(killer));     write_short(0);     write_short(1);     message_end();             new kname[32], vname[32], kauthid[32], vauthid[32], kteam[10], vteam[10];     get_user_name(killer, kname, 31);     get_user_team(killer, kteam, 9);     get_user_authid(killer, kauthid, 31);       get_user_name(victim, vname, 31);     get_user_team(victim, vteam, 9);     get_user_authid(victim, vauthid, 31);             log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"%s^"",     kname, get_user_userid(killer), kauthid, kteam,     vname, get_user_userid(victim), vauthid, vteam, weapon);     return PLUGIN_CONTINUE; }
Now, my problem is that sometimes it won't block the actual death message itself ( the one from CS ). So then it'll show 2 death messages sometimes.

Now, here's my damage function:
Code:
public BulletDamage(id,attacker) {     new iDmg = get_cvar_num("VM_silverbullets_damage");         if(get_user_team(id) != get_user_team(attacker))     {         if(get_user_health(id) > iDmg)         {             fakedamage(id,"Silver Bullets",float(iDmg),DMG_BULLET);             #if defined DEBUG                 client_print(attacker,print_chat,"[VM] You did damage with silver bullets");             #endif         }         else             log_kill(attacker,id,"Silver Bullets",0);     }     return; }
Any ideas? Or maybe someone has a better way of doing this. Thanks
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-27-2005 , 03:36  
Reply With Quote #2

where do you block the deathmsg>??
Freecode is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 08-27-2005 , 03:43  
Reply With Quote #3

Code:
user_silentkill(victim)
I kill him, then make my own death message.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-27-2005 , 03:45  
Reply With Quote #4

post that function too
Freecode is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 08-27-2005 , 03:46  
Reply With Quote #5

Ahem
http://amxmodx.org/funcwiki.php?go=func&id=404
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 08-27-2005 , 03:47  
Reply With Quote #6

Quote:
Originally Posted by v3x
O DISS! MESSED YOU UP!
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-27-2005 , 03:58  
Reply With Quote #7

anyways beyond the stupid comments by GHW.
v3x id imagine that something is broken inside block msg if it doesnt block like you say. But it seems to me that log_kill might be getting called twice at once. throw in a debug message in there to see how many times it gets called when you get 2 deathmsg's
Freecode is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 08-27-2005 , 04:00  
Reply With Quote #8

Well.. What I meant was that the original deathmsg gets called ( the one coming from CS itself ), and then mine gets called.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 08-27-2005 , 04:01  
Reply With Quote #9

Quote:
Originally Posted by v3x
Well.. What I meant was that the original deathmsg gets called ( the one coming from CS itself ), and then mine gets called.
i understood that....
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-27-2005 , 04:01  
Reply With Quote #10

and you know the original gets called how?
ill check the block_msg native in a sec
GHW: Keep yourself outta this. Thank You
Freecode 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 14:23.


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