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

Player information Card


Zopto
 Share

Recommended Posts

Some players like to see information from other players. As for level, stats etc.. so let start

Credits to **Mortal Angels** for fix!!
And **Zopto** for starting the basic system
Here is the working code with str, agi e.c.t. that you know whats what
**All ClientSide**
Search
```
Public Sub DrawPlayerName(ByVal Index As Long)
```Change to
```
Public Sub DrawPlayerName(ByVal Index As Long, myTarget As Long)
```Search
```
    If Options.Debug = 1 Then On Error GoTo errorhandler
```Under add
```
    If frmMain.picPlayerInfo.Visible = True Then
        If myTargetType = TARGET_TYPE_PLAYER And myTarget <> MyIndex Then
      frmMain.lblPlayerName.Caption = Trim(Player(myTarget).Name) & "- Level" & Trim(Player(Index).Level)
      frmMain.charstat(0).Caption = "Str: " & Trim(Player(myTarget).Stat(1))
      frmMain.charstat(1).Caption = "End: " & Trim(Player(myTarget).Stat(2))
      frmMain.charstat(2).Caption = "Int: " & Trim(Player(myTarget).Stat(3))
      frmMain.charstat(3).Caption = "Agi: " & Trim(Player(myTarget).Stat(4))
      frmMain.charstat(4).Caption = "Will: " & Trim(Player(myTarget).Stat(5))
      Else
      frmMain.picPlayerInfo.Visible = False
        AddText "Invalid target.", BrightRed
      End If
    Else
    End If
```Search
```
    ' draw player names
    For i = 1 To Player_HighIndex
        If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
            Call DrawPlayerName(i)
        End If
    Next
```Change to
```
    ' draw player names
    For i = 1 To Player_HighIndex
        If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
            Call DrawPlayerName(i, myTarget)
        End If
    Next
```
Now at frmMain
Make an PictureBox, name it picPlayerInfo
Create an Label, name it lblPlayerName
Create an Label, name it charstat
Copy it 4 Times untill you got something that looks like this:

[![](http://www7.pic-upload.de/thumb/02.08.12/n19u1wx425kb.png)](http://www.pic-upload.de/view-15410655/Unbenannt.png.html)

Now add an label where the menu is (Its to open the pic)
Klick on it and paste in
```
            If Not picPlayerInfo.Visible Then
                picPlayerInfo.Visible = True

            Else
                picPlayerInfo.Visible = False
            End If
```**EDIT–-**
picPlayerInfo Example with Close
Just Copy/Paste then add to
Close / lblPICard_Click
```
picPlayerInfo.visible = False
```
Now Search
```
    frmMain.picHotbar.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\hotbar.jpg")
```And under it add
```
    frmMain.picPlayerInfo.Picture = LoadPicture(App.Path & "\data files\graphics\gui\main\playerinfo.jpg")
```
Now put the playerinfo.jpg to data files\graphics\gui\main\
http://www.touchofdeathforums.com/smf2/index.php?action=dlattach;topic=82036.0;attach=21717;image
Player info card
http://www.touchofdeathforums.com/smf2/index.php?action=dlattach;topic=82036.0;attach=21715
Now if you got an target and klick on this label it will show the pic with Name, Level and stats
Link to comment
Share on other sites

myTarget ???
Its ised at the guild system so try it ;-)
SO :
```
frmMain.picPlayerInfo.Visible = True
      frmMain.lblPlayerName.Caption = Trim  (Player (myTarget). Name)
      frmMain.lblPlayerName = Trim  (Player (myTarget). Name) & "- Level" & Trim  (Player (myTarget). Level)
      frmMain.charstat (0). Caption = Trim  (Player (myTarget). Stat (1))
      frmMain.charstat (1). Caption = Trim  (Player (myTarget). Stat (2))
      frmMain.charstat (2). Caption = Trim  (Player (myTarget). Stat (3))
      frmMain.charstat (3). Caption = Trim  (Player (myTarget). Stat (4))
      frmMain.charstat (4). Caption = Trim  (Player (myTarget). Stat (5))

```I cant test it im not at home at the moment so i can just give you ideas xD (Off topic: Replyed Guild's)¨
EDIT–-
And dont forget to change the dim and the other stuff you need for it
Ill try out whats working if im at home ;-)
Link to comment
Share on other sites

@Zopto:

> i found bug: when i click on player it show my status exept his
> dose any one cnow how to fix that??

i think this one

   ```
frmMain.picPlayerInfo.Visible = True
      frmMain.lblPlayerName.Caption = Trim  (Player (Mytarget , Index). Name)
      frmMain.lblPlayerName = Trim  (Player (Mytarget , Index). Name) & "- Level" & Trim  (Player (Mytarget , Index). Level)
      frmMain.charstat (0). Caption = Trim  (Player (Mytarget , Index). Stat (1))
      frmMain.charstat (1). Caption = Trim  (Player (Mytarget , Index). Stat (2))
      frmMain.charstat (2). Caption = Trim  (Player (Mytarget , Index). Stat (3))
      frmMain.charstat (3). Caption = Trim  (Player (Mytarget , Index). Stat (4))
      frmMain.charstat (4). Caption = Trim  (Player (Mytarget , Index). Stat (5))

```
Idk if this work , I will check later.
Link to comment
Share on other sites

**All ClientSide**
Search
```
Public Sub DrawPlayerName(ByVal Index As Long)
```Change to
```
Public Sub DrawPlayerName(ByVal Index As Long, myTarget As Long)
```Search
```
    If Options.Debug = 1 Then On Error GoTo errorhandler
```Under add
```
    If frmMain.picPlayerInfo.Visible = True Then
        If myTargetType = TARGET_TYPE_PLAYER And myTarget <> MyIndex Then
      frmMain.lblPlayerName.Caption = Trim(Player(myTarget).Name) & "- Level" & Trim(Player(Index).Level)
      frmMain.charstat(0).Caption = "Str: "Trim(Player(myTarget).Stat(1))
      frmMain.charstat(1).Caption = "End: "Trim(Player(myTarget).Stat(2))
      frmMain.charstat(2).Caption = "Int: "Trim(Player(myTarget).Stat(3))
      frmMain.charstat(3).Caption = "Agi: "Trim(Player(myTarget).Stat(4))
      frmMain.charstat(4).Caption = "Will: "Trim(Player(myTarget).Stat(5))
      Else
      frmMain.picPlayerInfo.Visible = False
        AddText "Invalid target.", BrightRed
      End If
    Else
    End If
```Search
```
    ' draw player names
    For i = 1 To Player_HighIndex
        If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
            Call DrawPlayerName(i)
        End If
    Next
```Change to
```
    ' draw player names
    For i = 1 To Player_HighIndex
        If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
            Call DrawPlayerName(i, myTarget)
        End If
    Next
```
Now at frmMain
Make an PictureBox, name it picPlayerInfo
Create an Label, name it lblPlayerName
Create an Label, name it charstat
Copy it 4 Times untill you got something that looks like this:

[![](http://www7.pic-upload.de/thumb/02.08.12/n19u1wx425kb.png)](http://www.pic-upload.de/view-15410655/Unbenannt.png.html)

Now add an label where the menu is (Its to open the pic)
Klick on it and paste in
```
            If Not picPlayerInfo.Visible Then
                picPlayerInfo.Visible = True

            Else
                picPlayerInfo.Visible = False
            End If
```Now if you got an target and klick on this label it will show the pic with Name, Level and stats
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...