Quote:
Originally Posted by ricardo178
pawn Code:
public OnPlayerText(playerid, text[]) { #define STRING_TO_FOUND "hi" #define STRING_TO_ADD "hello" new text[128] = "hi, whats up? im here for u"; if(strfind(text, STRING_TO_FOUND, true) != -1) { new pos = strfind(text, STRING_TO_FOUND, true); new length = strlen(STRING_TO_FOUND); strdel(text, pos, length); strins(text, STRING_TO_ADD, pos, length); } print(text); }
Someone with a scripting level over 9000 should know how to do this...
|
Thats the wrong way to do it, I know how to copy and paste.