Raised This Month: $ Target: $400
 0% 

DeathMsg shows suicide [Solved]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
BigDontCry
Member
Join Date: Nov 2007
Location: Sweden
Old 11-21-2007 , 03:25   DeathMsg shows suicide [Solved]
Reply With Quote #1

Hi.

I have a little problem... I'm trying to make a deathmsg show when someone is killed by a ultimate. First of all, it show that the killed player made a "suicide", then it shows that the killer killed the vicitm (as it should)... How do I get rid of the suicide message?

Here's my code:

PHP Code:
public check_ultimates() {
 
 new 
players[32], numplayers
 get_players
(playersnumplayers)
 
 new 
id
 
 
for(new 0numplayersi++) {
  
id players[i]
  if(!
ultimate_used[id] && is_user_alive(id) && !freezetime && !u_delay) {
   
set_hudmessage(255000.020.7010.010.01,_,_,-1)
   
show_hudmessage(id"[ Ultimate Ready ]")
 
  }
 }
}
public 
cast_ultimate(id) {
 
 if(
freezetime) {
  
client_print(idprint_chat"[%s] You can't use your ultimate during freezetime"MOD)
  return 
PLUGIN_CONTINUE
 
}
 
 if(
u_delay) {
  
set_hudmessage(255255255, -1.00.706.04.0,_,_,-1)
  
show_hudmessage(id"You can't use your ultimate the first 10 seconds of a round")
  return 
PLUGIN_CONTINUE
 
}
 
 if(!
is_user_alive(id)) {
  return 
PLUGIN_CONTINUE
 
}
 
 if(
ultimate_used[id]) {
  
client_print(idprint_center"[%s] You can't use your ultimate yet"MOD)
  return 
PLUGIN_CONTINUE
 
}
 
 new 
origin[3]
 
get_user_origin(idorigin)
 
 for(new 
03i++) {
  
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
  
write_byte(TE_BEAMCYLINDER)
  
write_coord(origin[0])
  
write_coord(origin[1])
  
write_coord(origin[2])
  
write_coord(origin[0])
  
write_coord(origin[1])
  
write_coord(origin[2] + 400)
  
write_short(g_shockwave)
  
write_byte(0)
  
write_byte(0)
  
write_byte(10)   // Life
  
write_byte(64)   // Width
  
write_byte(255)   // Noise
  
write_byte(230)   // Red
  
write_byte(70)   // Green
  
write_byte(0)   // Blue
  
write_byte(255)   // Brightness
  
write_byte(0)   // Scrollspeed
  
message_end()
 }
 
 new 
players[32], numplayers
 get_players
(playersnumplayers)
 
 new 
itargetiddistancetargetorigin[3], damagemultiplier
 
 
for(0numplayersi++) {
  
targetid players[i]
  
get_user_origin(targetidtargetorigin)
  
distance get_distance(origintargetorigin)
 
  if(
distance <= 400 && get_user_team(targetid) != get_user_team(id)) {
   
multiplier = (80 80) / 400
   damage 
= (400 distance) * multiplier
   damage 
sqrt(damage)
 
   if(
is_user_alive(targetid)) {
    
// Shake Screen
    
message_begin(MSG_ONEgmsgShake, {0,0,0}, targetid)
    
write_short(255<<14)
    
write_short(10<<14)
    
write_short(255<<14)
    
message_end()
 
    
// Fade Screen
    
message_begin(MSG_ONEgmsgFade, {0,0,0}, targetid)
    
write_short(1<<12)
    
write_short(1<<8)
    
write_short(1<<0)
    
write_byte(230)
    
write_byte(70)
    
write_byte(0)
    
write_byte(200)
    
message_end()
 
    
set_user_health(targetidget_user_health(targetid) - damage)
 
    if(
get_user_health(targetid) <= 0) {
     
message_begin(MSG_ALLgmsgDeathMsg, {0,0,0}, 0)
     
write_byte(id)
     
write_byte(targetid)
     
write_byte(0)
     
write_string("shockwave")
     
message_end()
 
     
set_user_frags(idget_user_frags(id) + 1)
     
set_user_frags(targetidget_user_frags(id) + 1)
    }
   }
  }
 }
 
 
emit_sound(id,CHAN_AUTO"debris/beamstart7.wav"1.0ATTN_NORM0PITCH_NORM)
 
 
ultimate_used[id] = true
 
 set_task
(38.0"recharge_ultimate"id)
 
 
 return 
PLUGIN_CONTINUE
}
public 
activate_ultimate(id) {
 
ultimate_used[id] = false
}
public 
recharge_ultimate(id) {
 
 if(!
ultimate_used[id]) {
  return 
PLUGIN_CONTINUE
 
}
 
 
set_hudmessage(2551700, -1.00.6506.01.8,_,_,-1)
 
show_hudmessage(id"[ Recharging Ultimate. Please Wait... ]")
 
 
message_begin(MSG_ONEgmsgBartimer, {0,0,0}, id)
 
write_byte(2)
 
write_byte(0)
 
message_end()
 
 
set_task(2.0"activate_ultimate"id)
 return 
PLUGIN_CONTINUE
}
public 
sqrt(num) {
   new 
div num
   
new result 1
   
while (div result) {        // end when div == result, or just below
      
div = (div result) / 2   // take mean value as new divisor
      
result num div
   
}
   return 
div

__________________
Big Men Don't Cry

Quote:
[20:23] [email protected]: I don't know how
[20:23] [email protected]: I'm only 15
[20:23] [email protected]: I don't know anything

Last edited by BigDontCry; 11-21-2007 at 08:28.
BigDontCry 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 01:22.


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