durama Posted June 14, 2009 Author Share Posted June 14, 2009 Ok im just starting scripting but how would i do thisi want the script to find the users name in the middle of a sentencefor exampleHello * how are you?*the user character name not there loginwhat would i have to do to accomplish this? Link to comment Share on other sites More sharing options...
balliztik1 Posted June 14, 2009 Share Posted June 14, 2009 Text is handled via the source code. This isn't a scripting matter. But you'd just do something like```For x = 1 to MAX_PLAYERS If IsPlaying(x) Then If InStr(1, Text, GetPlayerName(x) Then 'DO THINGS Exit Sub End If End IfNext``` Link to comment Share on other sites More sharing options...
durama Posted June 14, 2009 Author Share Posted June 14, 2009 ummm ok lol so itll probably be better to forget about it :P Link to comment Share on other sites More sharing options...
durama Posted June 14, 2009 Author Share Posted June 14, 2009 Never mind i figured it out!! im not sure you kneew what i meant tho here is my code```Case 0 call PlayerMsg(index,"hello " & GetPlayerName(index) & ".",BLUE) Exit Sub```so ya that works but thx anyways Link to comment Share on other sites More sharing options...
balliztik1 Posted June 14, 2009 Share Posted June 14, 2009 Oh, I see. I just didn't get your explanation. Yeah, that's much easier than I was thinking. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now