Use replace_all if you want to proceed the whole string.
But replace and replace_all are more to replace a string with another string, here you just want to replace a char with another char.
You could use this stock :
PHP Code:
replace_char_all( string[], len, cWhat, cWith )
{
for(new i; i<=len; i++)
{
if( string[i] == cWhat )
{
string[i] == cWith
}
}
return 1
}
Remember that after replacing the string (whatever the method you use), you have to block the command (PLUGIN_HANDLED_MAIN if you want other plugin to be able to receive original text), and to send yours with engclient_cmd(id, "say", string)
Edit : seems you hook SayText with register_event, then you can't block it and you can't change string.
Either hook say command with register_clcmd, then consider the comment i made after stock, either you hook SayText message with register_message and there you can use set_msg_arg_string.
__________________