Replace a word in chat
#5

pawn Code:
#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);
this little code's example maybe can help you.. i do this fast.. im not sure if it work
Reply


Messages In This Thread
Replace a word in chat - by [NWA]Hannes - 09.06.2012, 18:30
Re: Replace a word in chat - by ryansheilds - 09.06.2012, 19:01
Re: Replace a word in chat - by [NWA]Hannes - 09.06.2012, 19:05
Re: Replace a word in chat - by ryansheilds - 09.06.2012, 19:14
Re: Replace a word in chat - by ReVo_ - 09.06.2012, 19:38
Re: Replace a word in chat - by Mauzen - 09.06.2012, 20:06
Re: Replace a word in chat - by [NWA]Hannes - 09.06.2012, 20:35
Re : Re: Replace a word in chat - by ricardo178 - 09.06.2012, 20:39
Re: Re : Re: Replace a word in chat - by [NWA]Hannes - 09.06.2012, 21:02

Forum Jump:


Users browsing this thread: 2 Guest(s)