Raised This Month: $ Target: $400
 0% 

Variables "You got killed by %killer%


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 06-04-2005 , 18:24   Variables "You got killed by %killer%
Reply With Quote #1

How do i do this..

I got:

Code:
public client_death(killer,victim,wpnindex,hitplace,TK) {     client_cmd(victim,"mp3 play sound/misc/kenny1.mp3")     client_print(victim, print_chat, "You got killed by:")     return PLUGIN_CONTINUE }

Now i want the server says to the killed person: You got killed by %killer%

Where %killer% is the player who killed the other 1.
Bento is offline
Ninja_Munkey
Junior Member
Join Date: Jun 2005
Old 06-04-2005 , 18:30  
Reply With Quote #2

Code:
public client_death(killer,victim,wpnindex,hitplace,TK) {
    client_cmd(victim,"mp3 play sound/misc/kenny1.mp3")
    client_print(victim, print_chat, "You got killed by:" & killer)
    return PLUGIN_CONTINUE
}
Wouldn't it be something to this affect?
Ninja_Munkey is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 06-04-2005 , 18:33  
Reply With Quote #3

I doubt if that will work...
Bento is offline
faluco
Developer
Join Date: Mar 2005
Location: Valencia, Spain
Old 06-04-2005 , 18:40  
Reply With Quote #4

Code:
new killer_name[32] get_user_name(killer, killer_name, 31) client_print(victim, print_chat, "You got killed by %s",killer_name)
faluco is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 06-04-2005 , 18:44  
Reply With Quote #5

Tank you very much It worx
Bento is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 06-04-2005 , 18:58  
Reply With Quote #6

1 more little thing

How do u do this:

U got killed by %killer% in your %hitplace% with a %weapon%
Bento is offline
faluco
Developer
Join Date: Mar 2005
Location: Valencia, Spain
Old 06-04-2005 , 19:06  
Reply With Quote #7

jejeje, try this:the get weapon is for cs, if its other mod tell me because its different

at the top add this include <csx>

also need to add this
Code:
new body_part[8][] = {"Whole Body","Head","Chest","Stomach","Left Arm","Right Arm","Left Leg","Right Leg"}

and then add this as before
Code:
new killer_name[32], weapon_name[32] get_user_name(killer, killer_name, 31); xmod_get_wpnname(wpnindex, weapon_name, 31); client_print(victim,print_chat,"u got killed by %s with the %s and he hitted you in %s",killer_name,weapon_name,body_part[hitplace])

also you need to active the csx module[/small]
faluco is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 06-04-2005 , 19:10  
Reply With Quote #8

U are great!!!! TNX very much
Bento is offline
faluco
Developer
Join Date: Mar 2005
Location: Valencia, Spain
Old 06-04-2005 , 19:19  
Reply With Quote #9

if you like the info you can get the distance also, and if it was a TK make a different message.
One thing, if he killed you with a grenade it will tell you "you were killed with its primary weapon" so you would need a bit more of code

jejeje but to be perfect you need the thing of the grenade fix, look:
Code:
if (wpnindex == CSW_HEGRENADE)                       client_print(victim,print_chat, "u where killed by %s with a grenade he hitted you in %s", killer_name,body_part[hitplace])         else             client_print(victim,print_chat, "u where killed by %s with the %s he hitted you in %s", killer_name,weapon_name,body_part[hitplace])
and if you want also you where killed by bla bla with the m4a1 from a distance of 5 meters and hitted you in head tell
faluco is offline
Bento
SourceMod Donor
Join Date: May 2005
Location: The Netherlands
Old 06-04-2005 , 19:25  
Reply With Quote #10

worked gr8

If u have cz, try it out @ 80.61.6.39:27015
Bento 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 16:50.


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