SA-MP Forums Archive
IsSlotUsed? - 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: IsSlotUsed? (/showthread.php?tid=409651)



IsSlotUsed? - Admigo - 22.01.2013

Hi all,

Is it possible to make a function to Detect if a slotisused like for a inventory system?
Like:
Код:
Slot 1 = used
Slot 2 = used
Slot 3 = Unused.
Slot 4 = used so the item will go to slot 3
Any tips how i can make this?

Admigo


Re: IsSlotUsed? - ikey07 - 22.01.2013

pawn Код:
new Sots[10];

for(new i; i < sizeof(Slots); i++)
{
if(Slot[i] == 0)//If Free
{
Slot[i] = 1;//Start to use
break;
}
}



Re: IsSlotUsed? - Jeffry - 22.01.2013

Nvm. Read it wrongly.
My mistake.


Re: IsSlotUsed? - Admigo - 20.04.2013

Quote:
Originally Posted by ikey07
Посмотреть сообщение
pawn Код:
new Sots[10];

for(new i; i < sizeof(Slots); i++)
{
if(Slot[i] == 0)//If Free
{
Slot[i] = 1;//Start to use
break;
}
}
Is it possible to add playerid like :
Код:
IsSlotUsed[playerid][slotid]=clothesid;//so i can detect if the player has used that slot with that clothesid