21-07-2006, 04:00 AM
What did I do wrong here I think it shold work but when I click NPC it targets thembut doesnt open the Form... heres code.
Server:
CLIENT SIDE:
Also I have on each...
Server:
Code:
' Check for an npc
For i = 1 To MAX_MAP_NPCS
If MapNpc(GetPlayerMap(Index), i).Num > 0 Then
If MapNpc(GetPlayerMap(Index), i).x = x And MapNpc(GetPlayerMap(Index), i).y = y Then
' Change target
Player(Index).Target = i
Player(Index).TargetType = TARGET_TYPE_NPC
BattleOpen = 1
Call PlayerMsg(Index, "Your target is now a " & Trim(Npc(MapNpc(GetPlayerMap(Index), i).Num).Name) & ".", Yellow)
Else
BattleOpen = 0
Exit Sub
End If
End If
Next i
Exit Sub
End If
CLIENT SIDE:
Code:
' Open Battle Form
If BattleOpen = 1 Then
frmBattle.Visible = True
Else
frmBattle.Visible = False
End If
Also I have on each...
Code:
Dim BattleOpen As Long