Jump to content
MakeWebGames

item_add function


hobbes
 Share

Recommended Posts

Has anyone come up with a good item_add function? The current one creates new id's for the same items and when sorting the users inventory, it can slow things down on the server.

 

I am about to do a server reset soon after the beta is finished. I think I might change my inventory structure to a itemid qty +1 sort of script. Has anyone done something like this yet?

Link to comment
Share on other sites

  • 3 weeks later...

Re: item_add function

No I belive its like this...

THis is NOT tested....

item_add($userid,40,1)

 

What this mean is this..

item_add is a function in version 2 like they said...just like event_add

Now on item_add there are 3 parts as you see..

first is UserID that is to recive it.

second is item ID

third is Quanity of item...

so on this...

Its going to send to MY USERID

and its going to give me ITEM ID 40

and add the Quanity of 1 to my inventory.

Like i said its not test...but I hope it works...if not should help point you in right direction :-D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...