05.12.2012, 15:12
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...
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
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;
}
anyone knows how to fix this?
greets niels