Please help me with this command
#6

Well i think the problem is here

pawn Code:
if((dialogid == TOYS) && response)
    {
        if(PlayerToyInfo[playerid][listitem][ptModelID] == 0)
        {
            ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Toy Menu: Attach/Deattach", "Woops! You don't have anything to put on from that slot", "OK", "");
        }
        else
        {
            if(IsPlayerAttachedObjectSlotUsed(playerid, listitem))
            {
                new name[24];
                format(name, sizeof(name), "None");

                for(new i;i<sizeof(HoldingObjectsToys1);i++)
                {
                    if(HoldingObjectsToys1[i][holdingmodelid] == PlayerToyInfo[playerid][listitem][ptModelID])
                    {
                        format(name, sizeof(name), "%s", HoldingObjectsToys1[i][holdingmodelname]);
                    }
                }
                new string[400];
                format(string, sizeof(string), "Successfully unequipped %s (Bone: %s) (Slot: %d)", name, HoldingBones[PlayerToyInfo[playerid][listitem][ptBone]], listitem);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                RemovePlayerAttachedObject(playerid, listitem);
            }
            else
            {
                SetPlayerAttachedObject(playerid, listitem, PlayerToyInfo[playerid][listitem][ptModelID], PlayerToyInfo[playerid][listitem][ptBone], PlayerToyInfo[playerid][listitem][ptPosX], PlayerToyInfo[playerid][listitem][ptPosY], PlayerToyInfo[playerid][listitem][ptPosZ], PlayerToyInfo[playerid][listitem][ptRotX],
                PlayerToyInfo[playerid][listitem][ptRotY], PlayerToyInfo[playerid][listitem][ptRotZ], PlayerToyInfo[playerid][listitem][ptScaleX], PlayerToyInfo[playerid][listitem][ptScaleY], PlayerToyInfo[playerid][listitem][ptScaleZ]);
                new name[24];
                format(name, sizeof(name), "None");

                for(new i;i<sizeof(HoldingObjectsToys1);i++)
                {
                    if(HoldingObjectsToys1[i][holdingmodelid] == PlayerToyInfo[playerid][listitem][ptModelID])
                    {
                        format(name, sizeof(name), "%s", HoldingObjectsToys1[i][holdingmodelname]);
                    }
                }
                new string[400];
                format(string, sizeof(string), "Successfully equipped %s (Bone: %s) (Slot: %d)", name, HoldingBones[PlayerToyInfo[playerid][listitem][ptBone]], listitem);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            }
        }
    }
Reply


Messages In This Thread
Please help me with this command - by MayaEU - 23.06.2016, 14:48
Re: Please help me with this command - by MayaEU - 23.06.2016, 15:24
Re: Please help me with this command - by Owen007 - 23.06.2016, 15:27
Re: Please help me with this command - by MayaEU - 23.06.2016, 15:49
Re: Please help me with this command - by [KHK]Khalid - 23.06.2016, 15:57
Re: Please help me with this command - by MayaEU - 23.06.2016, 16:29
Re: Please help me with this command - by MayaEU - 23.06.2016, 17:27
Re: Please help me with this command - by MayaEU - 24.06.2016, 07:15

Forum Jump:


Users browsing this thread: 1 Guest(s)