Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Calling Names


durama
 Share

Recommended Posts

Ok im just starting scripting but how would i do this

i want the script to find the users name in the middle of a sentence

for example

Hello * how are you?

*the user character name not there login

what would i have to do to accomplish this?
Link to comment
Share on other sites

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 If
Next
```
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...