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

Clear the target of the players that are marked on a player who left the game or map


iHero
 Share

Recommended Posts

**Server~Side**

> modPlayer

In _Sub PlayerWarp_ find:

```

TempPlayer(index).target = 0

TempPlayer(index).targetType = TARGET_TYPE_NONE

SendTarget index
```

Above add:

```

' clear target

For i = 1 To Player_HighIndex

' Prevent subscript out range

If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(index) Then

If TempPlayer(i).targetType = TARGET_TYPE_PLAYER And TempPlayer(i).target = index Then

TempPlayer(i).target = 0

TempPlayer(i).targetType = TARGET_TYPE_NONE

SendTarget i

End If

End If

Next
```

In _Sub LeftGame_ find:

```

' leave party.

Party_PlayerLeave index
```

Below add:

```

' clear target

For i = 1 To Player_HighIndex

' Prevent subscript out range

If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(index) Then

' clear players target

If TempPlayer(i).targetType = TARGET_TYPE_PLAYER And TempPlayer(i).target = index Then

TempPlayer(i).target = 0

TempPlayer(i).targetType = TARGET_TYPE_NONE

SendTarget i

End If

End If

Next
```

**Credits**

Ricardo
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...