[EO]Use Item to change sprite

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!


do like this for code XD

I forgot lol

Oh cool I can make some sort of hair change!

well its for char i think, but if u modify it, then sure @[member=“Hackertatio”]

@[member=“Golf”] ur money amount lol……

yeah it’s easy to set hair color with UseItem if you already have hair color changing in your engine.

nice thing, this help for the new members :).

Log in to reply