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

[EO]Use Item to change sprite


Golf
 Share

Recommended Posts

Hi,

this is tutorial how to change your sprite by using item

BOTH

In both(Server and client) in modTypes in ItemRec add :

```

Sprite as Long
```
CLIENT SIDE

In item editor form add label and name it lblSprite and scrollbar scrlSprite

in scrlSprite code add :

```

lblSprite.Caption = "Sprite: " & scrlSprite.Value
    Item(EditorIndex).Sprite = scrlSprite.Value

```
Go to modGameEditors, find sub:
ItemEditorInit

and add:

```

frmeditor_item.scrlSprite.Value = Item(EditorIndex).Sprite
```

SERVER SIDE:

Go to modPlayer and in sub UseItem  at the end of every case  add :

```

'Check Sprite
                If Item(itemnum).Sprite = 0 Then
                'If there is no sprite it wont change it 
                Else
                SetPlayerSprite Index, Item(itemnum).Sprite
                Call SendPlayerData(Index)
                End If
```

DONE!
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...