Raised This Month: $ Target: $400
 0% 

Shows 2 deaths


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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