PlayerAttachedObject.
#1

Hello,
I wanted to ask that I am making a attached object system but I am stuck at the last thing,"How to save them in slots.".If a person bought a attached object,for instance I bought a helmet, and it saves in slot one,and then I buy glasses and then it saves in slot 2,and when a person types /removeobject,the object removes and saves it in the slots,just don't script the whole thing for me just tell what is needed and how to save them,if you show me the whole code please please just explain them briefly.
ThAnKs.
Reply
#2

bump..please just suggest something.
Reply
#3

You can save it like this, look.
Код:
#define MAX_ITEMS 10 // the ammount of items you have.

new items[MAX_ITEMS][1]; // crate the variable in which you can save the objects.


for(new i = 0; i < MAX_ITEMS; i++) // This code will add an item to a un-used slot.
{
      if(items[i][0] == 0)
      { 
             items[1][0] = 1;
      }
}
Reply
#4

Thanks.That gave me a idea.
ThAnKs! +rep.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)