Detect all slots if they have the same value.
#2

Try

pawn Код:
for(new i,d; i != MAX_SLOTS; i++)
{
    for(d=1; d != 11; d++)
        if(WearClothesItems[playerid][i] == ClothesItems[playerid][d])
        {
            SendClientMessage(playerid,COLOR_RED,"You already wearing this clothes");
            return 0;
        }
        else
        {
            ClothesID[playerid] = ClothesItems[playerid][d];
            GetClothesID(playerid);
            SetPlayerAttachedObject(playerid, GetFreeClothesSlot[playerid], GetClothesID(playerid), GetClothesBoneID(playerid));
            EditAttachedObject(playerid, GetFreeClothesSlot[playerid]);
            WearClothesItems[playerid][GetFreeClothesSlot[playerid]] = ClothesItems[playerid][number];//This will store the item ids and on what attachmentslot the wearing it.
            format(globalstring,sizeof(globalstring),"WearClothesItem[playerid][%d]=%d;",GetFreeClothesSlot[playerid],WearClothesItems[playerid][GetFreeClothesSlot[playerid]]);
            SendClientMessage(playerid,-1,globalstring);
            GetFreeClothesSlot[playerid]++;
            return 0;
        }
}
Reply


Messages In This Thread
Detect all slots if they have the same value. - by Admigo - 13.08.2013, 23:24
Re: Detect all slots if they have the same value. - by Jefff - 14.08.2013, 00:45
Re: Detect all slots if they have the same value. - by Admigo - 14.08.2013, 01:18

Forum Jump:


Users browsing this thread: 1 Guest(s)