PlayerAttachedObject. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: PlayerAttachedObject. (
/showthread.php?tid=368264)
PlayerAttachedObject. -
TaLhA XIV - 12.08.2012
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.
Re: PlayerAttachedObject. -
TaLhA XIV - 12.08.2012
bump..please just suggest something.
Re: PlayerAttachedObject. -
Shetch - 12.08.2012
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;
}
}
Re: PlayerAttachedObject. -
TaLhA XIV - 12.08.2012
Thanks.That gave me a idea.
ThAnKs! +rep.