Raised This Month: $ Target: $400
 0% 

multiple death messages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shino
Senior Member
Join Date: May 2006
Old 06-04-2006 , 09:57   multiple death messages
Reply With Quote #1

here's the code:
Code:
public plugin_init() {     register_plugin( PLUGINNAME, VERSION, AUTHOR )     register_event( "Damage", "DealDamage", "be" ); } public DealDamage( id ) {       new victim,attacker,damage,minnum,weap     victim = id     attacker = get_user_attacker(victim,weap)     damage = read_data(2)     minnum = 0     if(weap == CSW_AK47 || weap == CSW_AUG || weap == CSW_AWP || weap == CSW_DEAGLE ||     weap == CSW_ELITE || weap == CSW_FAMAS || weap == CSW_FIVESEVEN || weap == CSW_G3SG1 ||     weap == CSW_GALI || weap == CSW_GALIL || weap == CSW_GLOCK18 || weap == CSW_HEGRENADE ||     weap == CSW_KNIFE || weap == CSW_M249 || weap == CSW_M3 || weap == CSW_M4A1 ||     weap == CSW_MAC10 || weap == CSW_MP5NAVY || weap == CSW_P228 || weap == CSW_P90 ||     weap == CSW_SCOUT || weap == CSW_SG550 || weap == CSW_SG552 || weap == CSW_TMP ||     weap == CSW_UMP45 || weap == CSW_USP || weap == CSW_XM1014) {                             if( damage > minnum ) {             set_msg_block( get_user_msgid( "DeathMsg" ), BLOCK_ONCE )             user_kill(victim)             message_begin(MSG_ALL,get_user_msgid("DeathMsg"),{0,0,0})             write_byte(attacker)             write_byte(victim)             write_byte( 0 )             write_string( "usp" )             message_end()         }     }         return PLUGIN_CONTINUE }

when somebody is killed, this occures:
[img]http://img462.**************/img462/9849/sample3ux.jpg[/img]

what should i change in the code?
shino is offline
Locks
Senior Member
Join Date: Sep 2005
Old 06-04-2006 , 12:46  
Reply With Quote #2

Maybe try removing
Code:
user_kill(victim)
I don't see the purpose of having that since the victim is going to get killed anyways.
Locks is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 06-04-2006 , 13:01  
Reply With Quote #3

use user_silentkill to not show a death message.
You may have to leave the msg block because of the way Damage and DeathMsg work.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-04-2006 , 13:56  
Reply With Quote #4

Code:
stock cs_log_kill(killer, victim, weapon[],headshot) {     user_silentkill(victim);     set_msg_block(get_user_msgid("DeathMsg"),BLOCK_NOT);     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; }
__________________
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
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 06-04-2006 , 15:11  
Reply With Quote #5

where is the "make_deathmsg" function?
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Reply


Thread Tools
Display Modes

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 16:20.


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