Quote:
Originally Posted by tomato_love
Thank you very much! I think that did it! But still not quite right - when i type something and add the 'yo' my name shows up like its supposed to, but no text. Also when not using the "yo" no name or text appears at all. Should i unhook the say? or should the PLUGIN_HANDLED be something different?
or should:
Code:
if( (contain(said, "yo") != -1) && !(contain(said, " yo") != -1) ) {
client_print(0, print_chat, name, said);
maybe instead of using said, there is something else that will print the message?
|
When using strings in a format fashion, use the below within your string to represent the string variable then place the actual variables in the respective order.
%s - string
%d - interger
%f - float
ie.
new iNumber = 10
new szTest[] = "hello"
new Float:fNum = 0.50
To print these in a string.
client_print( 0 , print_chat , "%s please give me %d dollars. i will give you %f cents." , szTest , iNumber , fNum )
The above will result in "hello please give me 10 dollars. i will give you 0.50 cents."
PHP Code:
if( (contain(said, "yo") != -1) && !(contain(said, " yo") != -1) ) {
client_print(0, print_chat, "%s said %s" , name , said )
__________________