Raised This Month: $ Target: $400
 0% 

green chat message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ch3cker
Veteran Member
Join Date: Jun 2005
Location: Deutschland / Baden-Würt
Old 10-05-2006 , 12:32   green chat message
Reply With Quote #1

hi guys
i have a script in it it show a message
Code:
client_print(id, print_chat, "Schreibe /myhits um deine Angreifer und Treffer zu sehen!")
Now i want to that this message will be shown in green. This message is shown to a player who is killed.
Now how is it possible to make this?
I found this
Code:
public plugin_init() {     
register_clcmd("say","hook_say") } 

public hook_say(id) {     
message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)     write_byte(id)
write_string("^x03Team colored text ^x01Normal color")
message_end()         
return PLUGIN_HANDLED 
}
But I dont know how to change this to print this colored message (if its possible in green) to this one killed player.

Please help me
__________________
SORRY 4 MY BAD ENGLISH

Last edited by ch3cker; 10-05-2006 at 12:35.
ch3cker is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Old 10-05-2006 , 12:52   Re: green chat message
Reply With Quote #2

Your posted Code already prints Message to only one Player. (Use ^x04 for green. (CS ONLY))
So you just have to get the ID of the dead Player. Use:
Code:
#include <amxmodx> public plugin_init() {     register_event("DeathMsg","hook_death","a","1>0")     // "a" means "Global Event", "1>0" means Killer must not be "worldspawn" (Drowning, Falling, etc.) } public hook_death() {     new killer_id=read_data(1)     new victim_id=read_data(2)     // Your Message Stuff }
__________________
EAT YOUR VEGGIES

Last edited by Silencer123; 10-05-2006 at 13:02.
Silencer123 is offline
ch3cker
Veteran Member
Join Date: Jun 2005
Location: Deutschland / Baden-Würt
Old 10-07-2006 , 17:36   Re: green chat message
Reply With Quote #3

jeah thx
now it works
__________________
SORRY 4 MY BAD ENGLISH
ch3cker is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Old 10-07-2006 , 18:19   Re: green chat message
Reply With Quote #4

No problem ;)
__________________
EAT YOUR VEGGIES
Silencer123 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 04:45.


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