FAQ
FAQ
Search
Search
Memberlist
Memberlist
Usergroups
Usergroups
Profile
Profile
Log out [ genusis ]
Log out [ genusis ]
You have no new messages
You have no new messages
Elysium Source Forum Index » Approved Tutorials

Post new topic   Reply to topic
Diamond Paperdoll (v5) Goto page Previous  1, 2, 3, 4, 5, 6
View previous topic :: View next topic  
Author Message
El_Dindonnier
Newcomer


Joined: 18 Jun 2006
Posts: 24

Points

PostPosted: Sat Nov 04, 2006 2:36 pm    Post subject: Reply with quote

frozengod wrote:
If you have errors when you die, or when you drop items, this is the fix for you...


Quote:
make sure you have these server side.

The first part goes in ModServerTCP "HandleData" Sub.
The other part is in ModGameLogic, you probably dont have the first part.



Quote:

' :::::::::::::::::::::::::::::::::::::::::::::::
' :: Player trying to pick up something packet ::
' :::::::::::::::::::::::::::::::::::::::::::::::
Case "mapgetitem"
Call PlayerMapGetItem(Index)
Exit Sub



Quote:
Sub PlayerMapGetItem(ByVal Index As Long)
Dim i As Long
Dim N As Long
Dim MapNum As Long
Dim Msg As String

If IsPlaying(Index) = False Then
Exit Sub
End If
MapNum = GetPlayerMap(Index)
For i = 1 To MAX_MAP_ITEMS

' See if theres even an item here
If (MapItem(MapNum, i).num > 0) And (MapItem(MapNum, i).num <= MAX_ITEMS) Then

' Check if item is at the same location as the player
If (MapItem(MapNum, i).x = GetPlayerX(Index)) And (MapItem(MapNum, i).y = GetPlayerY(Index)) Then

' Find open slot
N = FindOpenInvSlot(Index, MapItem(MapNum, i).num)

' Open slot available?
If N <> 0 Then

' Set item in players inventor
Call SetPlayerInvItemNum(Index, N, MapItem(MapNum, i).num)

If Item(GetPlayerInvItemNum(Index, N)).Type = ITEM_TYPE_CURRENCY Then
Call SetPlayerInvItemValue(Index, N, GetPlayerInvItemValue(Index, N) + MapItem(MapNum, i).Value)
Msg = "You picked up " & MapItem(MapNum, i).Value & " " & Trim$(Item(GetPlayerInvItemNum(Index, N)).Name) & "."
Else
Call SetPlayerInvItemValue(Index, N, 0)
Msg = "You picked up a " & Trim$(Item(GetPlayerInvItemNum(Index, N)).Name) & "."
End If
Call SetPlayerInvItemDur(Index, N, MapItem(MapNum, i).Dur)

' Erase item from the map
MapItem(MapNum, i).num = 0
MapItem(MapNum, i).Value = 0
MapItem(MapNum, i).Dur = 0
MapItem(MapNum, i).x = 0
MapItem(MapNum, i).y = 0
Call SendInventoryUpdate(Index, N)
Call SpawnItemSlot(i, 0, 0, 0, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))
Call PlayerMsg(Index, Msg, Yellow)
Exit Sub
Else
Call PlayerMsg(Index, "Your inventory is full.", BrightRed)
Exit Sub
End If
End If
End If
Next
End Sub


Yes I have all of them but I have the rt9 when a player has dead.
In the client I have (in visual basic):
Code wrote:

Call BitBlt(frmMirage.WeaponImage.hDC, 0, 0, PIC_X, PIC_Y, frmMirage.picItems.hDC, (Item(GetPlayerInvItemNum(MyIndex, Index)).Pic - Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * 6) * PIC_X, Int(Item(GetPlayerInvItemNum(MyIndex, Index)).Pic / 6) * PIC_Y, SRCCOPY)
Back to top
View user's profile Send private message MSN Messenger
frozengod
Sr. Member


Joined: 11 May 2006
Posts: 716
Location: Unknown
Points

PostPosted: Sat Nov 04, 2006 2:59 pm    Post subject: Reply with quote

look i know what happens and when the error happens. i posted the fix and it fixes your problem.
apply the fix and try testing it ?
I know it works ! Laughing
_________________



Back to top
View user's profile Send private message
Blackhand
Newcomer


Joined: 07 Nov 2006
Posts: 5

Points

PostPosted: Wed Nov 08, 2006 3:45 pm    Post subject: Reply with quote

Tested and works great, had it working in under 5 minutes.

I've encountered one problem though:

When the player is facing left, the weapon is rendered on top of the player ( and shield if holding one ) instead of behind him. Its not a major problem and I'm sure could be fixed fairly quickly. It looks fine when facing right.

EDIT: fixed a typo
EDIT:
Got it working by adding stuff for more directions instead of just <> DIR_UP
Back to top
View user's profile Send private message
Filiandor
Newcomer


Joined: 26 Sep 2006
Posts: 3

Points

PostPosted: Sun Nov 19, 2006 5:14 am    Post subject: Where? Reply with quote

Where do i add this code? in the server map and then which file? Plz need help!
Back to top
View user's profile Send private message
DemonBoy
Newcomer


Joined: 22 Jun 2006
Posts: 26

Points

PostPosted: Sun Nov 19, 2006 6:14 am    Post subject: Re: Where? Reply with quote

how does he do if have the sprites 32x64?
Back to top
View user's profile Send private message MSN Messenger
Filiandor
Newcomer


Joined: 26 Sep 2006
Posts: 3

Points

PostPosted: Mon Nov 20, 2006 2:41 pm    Post subject: Reply with quote

Can some 1 plz help me??
Back to top
View user's profile Send private message
BloodyArnoud
Member


Joined: 23 Sep 2006
Posts: 155
Location: Netherlands
Points

PostPosted: Mon Nov 20, 2006 3:54 pm    Post subject: Reply with quote

Filiandor wrote:
Can some 1 plz help me??


0mg plz n0 use ub3r-n00b1337 t4lk!

Open up server.vbp.

Don't forget to compile afterwards.

Next time:

Read the fucking manual!
_________________
***YES! I HAVE VISUALBASIC 6!***
Back to top
View user's profile Send private message AIM Address MSN Messenger
Filiandor
Newcomer


Joined: 26 Sep 2006
Posts: 3

Points

PostPosted: Tue Nov 21, 2006 8:38 am    Post subject: Reply with quote

Hey! Take it easy man...!
Back to top
View user's profile Send private message
rodneymillerpca
Jr. Member


Joined: 07 Mar 2006
Posts: 46

Points

PostPosted: Thu Dec 14, 2006 10:37 pm    Post subject: Thank you Reply with quote

Greetings,
Thank you Pingu. We added this to a fresh Elsium Diamond Source after Blt Names on Hover, [VB] Advanced Weather, and MP3 Support (Tested/Works) & Startup Music and we had no trouble. We will add your name to our credits.

Thank you again,
Rodney J. Miller PCA
A.K.A. Eternal Life
World of Ours
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Bonne
Newcomer


Joined: 22 Oct 2006
Posts: 30

Points

PostPosted: Sat Jan 13, 2007 7:31 am    Post subject: Reply with quote

Please help me... it works great, but i have 1 bug now.. it works perfectly when i walk left right or down, but when walking up the paperdoll is behind character :S how to add it in front of char?? and how to add different pic to Inv/Equip slots, coz they only show the upper part of item(ive got 32x64 sprites)

thanks in advance..
Back to top
View user's profile Send private message
Radzim
Newcomer


Joined: 30 Sep 2006
Posts: 32
Location: Poland!
Points

PostPosted: Tue Jan 16, 2007 4:52 am    Post subject: Reply with quote

THX PINGU !!!!!
This tut is work 100% but i must well-matched sheet item to paperdoll.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Elysium Source Forum Index » Approved Tutorials All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6
Page 6 of 6
Watch this topic for replies
 
Jump to:  
You cannot post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional