Raised This Month: $12 Target: $400
 3% 

How to make a player say?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pegro
Junior Member
Join Date: Apr 2009
Old 04-27-2009 , 10:18   How to make a player say?
Reply With Quote #1

In one of my heroes I want it to say something, as if he did /say "random stuff to say" in console.

What's the command?

sh_player_say(id, "STUFF TO SAY") something like that?


Thanks!
pegro is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 04-27-2009 , 11:38   Re: How to make a player say?
Reply With Quote #2

superheromod.inc (need sh 1.2.0) :
Code:
 /**
* Sends a chat message thru core to append colored [SH] to front of message.
* If heroID is supplied hero's name will be colored in parentheses ie "[SH](Batman) message displayed here"
*
* @note Max characters for message without heroID supplied is 186.
* Max characters for message with heroID supplied is
* between 183 and 160 depending on size of hero's name.
*
* @param id The index of the client.
* @param heroID The index of the hero, appends hero name to message. Set -1 to not append a hero name.
* @param message The chat message itself.
* @noreturn
*/
native sh_chat_message(id, heroID = -1, const message[], any:...);
other way : client_print

Last edited by Fr33m@n; 04-27-2009 at 12:17.
Fr33m@n is offline
pegro
Junior Member
Join Date: Apr 2009
Old 04-27-2009 , 13:44   Re: How to make a player say?
Reply With Quote #3

+karma

tho;

I could not get it to work as I wanted, I made it notice player only.
I want player to send eg.:
"/say LOLZ WTF LOLZ0RZ?!??!"

Last edited by pegro; 04-27-2009 at 21:37.
pegro is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 05-08-2009 , 11:13   Re: How to make a player say?
Reply With Quote #4

id is a player index from 1 to 32. If 0, the message will be sent to all players.

client_print (0, print_chat, "LOLZ WTF LOLZ0RZ?!??!")

Last edited by Fr33m@n; 05-08-2009 at 11:21.
Fr33m@n 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 19:39.


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