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?