Change this:
Code:
Sub LeftGame(ByVal Index As Long)
Dim n As Long
If Player(Index).InGame = True Then
Player(Index).InGame = False
' Check if player was the only player on the map and stop npc processing if so
If GetTotalMapPlayers(GetPlayerMap(Index)) = 1 Then
PlayersOnMap(GetPlayerMap(Index)) = NO
End If
' Check for boot map
If Map(GetPlayerMap(Index)).BootMap > 0 Then
Call SetPlayerX(Index, Map(GetPlayerMap(Index)).BootX)
Call SetPlayerY(Index, Map(GetPlayerMap(Index)).BootY)
Call SetPlayerMap(Index, Map(GetPlayerMap(Index)).BootMap)
End If
' Check if the player was in a party, and if so cancel it out so the other player doesn't continue to get half exp
If Player(Index).InParty = YES Then
n = Player(Index).PartyPlayer
Call PlayerMsg(n, GetPlayerName(Index) & " has left " & GAME_NAME & ", disbanning party.", Pink)
Player(n).InParty = NO
Player(n).PartyPlayer = 0
End If
Call SavePlayer(Index)
' Send a global message that he/she left
If GetPlayerAccess(Index) <= ADMIN_MONITER Then
Call GlobalMsg(GetPlayerName(Index) & " has left " & GAME_NAME & "!", JoinLeftColor)
Else
Call GlobalMsg(GetPlayerName(Index) & " has left " & GAME_NAME & "!", White)
End If
Call TextAdd(frmServer.txtText, GetPlayerName(Index) & " has disconnected from " & GAME_NAME & ".", True)
Call SendLeftGame(Index)
End If
Call ClearPlayer(Index)
End Sub
to this:
Code:
Sub LeftGame(ByVal Index As Long)
Dim n As Long
If Player(Index).InGame = True Then
' Check if player was the only player on the map and stop npc processing if so
If GetTotalMapPlayers(GetPlayerMap(Index)) = 1 Then
PlayersOnMap(GetPlayerMap(Index)) = NO
End If
Player(Index).InGame = False
' Check for boot map
If Map(GetPlayerMap(Index)).BootMap > 0 Then
Call SetPlayerX(Index, Map(GetPlayerMap(Index)).BootX)
Call SetPlayerY(Index, Map(GetPlayerMap(Index)).BootY)
Call SetPlayerMap(Index, Map(GetPlayerMap(Index)).BootMap)
End If
' Check if the player was in a party, and if so cancel it out so the other player doesn't continue to get half exp
If Player(Index).InParty = YES Then
n = Player(Index).PartyPlayer
Call PlayerMsg(n, GetPlayerName(Index) & " has left " & GAME_NAME & ", disbanning party.", Pink)
Player(n).InParty = NO
Player(n).PartyPlayer = 0
End If
Call SavePlayer(Index)
' Send a global message that he/she left
If GetPlayerAccess(Index) <= ADMIN_MONITER Then
Call GlobalMsg(GetPlayerName(Index) & " has left " & GAME_NAME & "!", JoinLeftColor)
Else
Call GlobalMsg(GetPlayerName(Index) & " has left " & GAME_NAME & "!", White)
End If
Call TextAdd(frmServer.txtText, GetPlayerName(Index) & " has disconnected from " & GAME_NAME & ".", True)
Call SendLeftGame(Index)
End If
Call ClearPlayer(Index)
End Sub
[edit]
Please notice all I did was move one line.