30.08.2011, 12:18
(
Last edited by JaTochNietDan; 30/08/2011 at 12:54 PM.
)
You could easily use the standard strfind function to do the same thing, for example:
Simple as that, no need for a custom function!
pawn Code:
public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, pname, sizeof(pname));
pname[strfind(pname, "_", false)] = ' '; // Find the location of _ in the array and replace it with a space!
format(str, sizeof(str), "%s says: %s", pname, text);
ProxDetector(30.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
return 0;
}