Replace a word in chat
#3

Quote:
Originally Posted by ryansheilds
View Post
pawn Code:
public OnPlayerText(playerid, text[])
{              
    if(strcmp("hi", text, true) == 0)
    {
    // Code here..
    }
}
Think this should work?
No it should work like that.. This just checks if player only writes "hi"

If it makes it any easier, i only want to replace "hi" with "hello", i dont want to replace any more words.

Like if someone writes "hi" in any message it will be turned to "hello".
hi my friends > hello my friends
oh hi hannes > oh hello hannes
omg hi i havent seen you for a long time > omg hello i havent seen you for a long time
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: 3 Guest(s)