deleting this object from my skin isnt working, using the default samp attachments.pwn
#1

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
Reply
#2

You added more 'AttachmentObjects' ?
Reply
#3

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.
Reply
#4

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
Reply
#5

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
Reply
#6

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

hmm okay bump...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)