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

Player information.


xppxdd
 Share

Recommended Posts

I want to Declare vars that hold some player data, like level, stats and stuff.

Iv'e tried using :
in the sub "UpdateDescWindow" (ye i know.. i need this to check whether the LevelReq of an item is bigger then the player level.)
```
Dim plvl As Long
Dim index as long
plvl = Player(index).Level

frmMain.lblPlevel = plvl

```
also with Player(index).Stat

Anyone :Z
Link to comment
Share on other sites

@Ryujin:

> ```
> Dim plvl As Long
> Dim index as long
> plvl = Get.Player(index).Level
>
> frmMain.lblPlevel = plvl
>
> ```

O_o No..

```
Dim plvl As Long
Dim index as long
plvl = Player(index).Level

frmMain.lblPlevel.caption = plvl

```
Or, alternatively:

```
frmMain.lblPlevel.caption = Player(index).Level
```
Link to comment
Share on other sites

@Lightning:

> O_o No..
>
> ```
> Dim plvl As Long
> Dim index as long
> plvl = Player(index).Level
>
> frmMain.lblPlevel.caption = plvl
>
> ```
> Or, alternatively:
>
> ```
> frmMain.lblPlevel.caption = Player(index).Level
> ```

@Lightning:

> O_o No..
>
> ```
> Dim plvl As Long
> Dim index as long
> plvl = Player(index).Level
>
> frmMain.lblPlevel.caption = plvl
>
> ```
> Or, alternatively:
>
> ```
> frmMain.lblPlevel.caption = Player(index).Level
> ```

umm.. read the first post, you just copy pasted what i said doesnt work :O
Link to comment
Share on other sites

~~No, he removed the Get.

You don't need to add Get. to get data, the GetPlayerX, GetPlayerMap, etc, are simply so named functions to get data, that already exists as Player(Index).x, Player(Index).Map, and so on.~~

Also, make sure you state the index exactly, because at the minute, you'd just be calling Player(0).Level.

EDIT, actually, the Get was the second post, but still, you DO **need to state the index, you can't just have it as a default long value**.

EDIT2, and the **caption property** too. Make sure that's there, like Lightning stated.

EDIT3, when using Stat, use Stat(NumberHere) according to your stats number, to choose the stat you're wanting to call.
Link to comment
Share on other sites

MOST subs and functions put the index in the parameters and the Index just gets passed from place to place. 

RANDOM EO FACT: the "Index" is the variable that is passed more than anything else in EO.

```
sub YourSub(ByVal index as long)

frmMain.lblPlevel.caption = player( index).Level

End Sub

```But to get the index into it you have to have its value from the last location, but that shouldn't be hard to get.

BUT

if you only want your index for JUST YOU, there is a global that you can use to do that (only works in the client)

```
sub YourSub()

frmMain.lblPlevel.caption = player(MyIndex).Level

End Sub

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