![]() |
Replacing Words
I'm trying to make a script where, if your chat text contains a certain word, it changes only that word and leaves the rest of the text alone
Any advice on how I am to accomplish this? I am not asking for a script, but nor do I want to my post own as it is rather...bad. |
Tokenize what playerchats, then use a loop to check the tokens for the text. Then replace the word if its found.
|
Quote:
I'd suggest using #e. |
how exactly am i to replace the word though?
|
Well, using #e would find theCURSEwithin other words. No? So, using tokens would be easier..
Hmm... In a for loop, where its checking for the text inside the tokense; Use a string, like client.chat and output the token to it. If it DOESNT FIND the text, then add the token onto the string. Else IF it FINDS the text that your looking for inside the token, then instead of adding the token into the string, add '*'s, or somthing. When the forloops over, output the string as #c. If it made any sense to you at all XD. |
id use indexof, strlen, and #e
|
O_o, I see watcha sayin' he'ya. XD
|
well I got it working, but it's cheasy and I would like to try a different way =X
I'm not really familiar with indexof =/ |
| All times are GMT +2. The time now is 10:00 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.