SA-MP Forums Archive
deleting this object from my skin isnt working, using the default samp attachments.pwn - 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: deleting this object from my skin isnt working, using the default samp attachments.pwn (/showthread.php?tid=397557)



deleting this object from my skin isnt working, using the default samp attachments.pwn - niels44 - 05.12.2012

hey ppl,

im using the attachments filterscript from samp, its default included in the download package, but now when i attach a turtle or anything else, and i wanna delete it again, it doesnt deletes it...

pawn Code:
case DIALOG_ATTACH_INDEX_SELECTION:
        {
            if(response)
            {
                if(IsPlayerAttachedObjectSlotUsed(playerid, listitem))
                {
                    ShowPlayerDialog(playerid, DIALOG_ATTACH_EDITREPLACE, DIALOG_STYLE_MSGBOX, \
                    "{FF0000}Attachment Modification", "Do you wish to edit the attachment in that slot, or delete it?", "Edit", "Delete");
                }
                else
                {
                    new string[4000+1];
                    for(new x;x<sizeof(AttachmentObjects);x++)
                    {
                        format(string, sizeof(string), "%s%s\n", string, AttachmentObjects[x][attachname]);
                    }
                    ShowPlayerDialog(playerid, DIALOG_ATTACH_MODEL_SELECTION, DIALOG_STYLE_LIST, \
                    "{FF0000}Attachment Modification - Model Selection", string, "Select", "Cancel");
                }
                SetPVarInt(playerid, "AttachmentIndexSel", listitem);
            }
            return 1;
        }
        case DIALOG_ATTACH_EDITREPLACE:
        {
            if(response) return EditAttachedObject(playerid, GetPVarInt(playerid, "AttachmentIndexSel"));
            else if(!response)
            {
                RemovePlayerAttachedObject(playerid, GetPVarInt(playerid, "AttachmentIndexSel"));
                return DeletePVar(playerid, "AttachmentIndexSel");
            }
            return 1;
        }
the ondialog response, but it aint working, i already changed some things as you might see, but still not working...

anyone knows how to fix this?

greets niels


Re: deleting this object from my skin isnt working, using the default samp attachments.pwn - ViniBorn - 05.12.2012

You added more 'AttachmentObjects' ?


Re: deleting this object from my skin isnt working, using the default samp attachments.pwn - Sting. - 05.12.2012

Its better not to play around with a download file from SA-MP which is complicated for me but very easy to regain as you can download again and get another attachments.pwn and .amx file.


Re: deleting this object from my skin isnt working, using the default samp attachments.pwn - park4bmx - 05.12.2012

Probably the dialog ids get mixed up with one of your gamemodes
Try 2 things
(1) Change the dialog ids
(2) return 0; at the end of OnDialogResponse in the FS


Re: deleting this object from my skin isnt working, using the default samp attachments.pwn - niels44 - 05.12.2012

as first, i already checked the dialogids, and thats not the thing thats bugging, but i will try to set this to return 0 tomorrow


Re: deleting this object from my skin isnt working, using the default samp attachments.pwn - niels44 - 06.12.2012

ok i checked the dialog response, and it already says return 0;... so anymore suggestions?


Re: deleting this object from my skin isnt working, using the default samp attachments.pwn - niels44 - 12.12.2012

hmm okay bump...