27.09.2012, 09:14
this is the command:
dialogrespone
Код:
if(!strcmp(cmdtext, "/attachments", true)) { new string[128]; for(new x;x<MAX_PLAYER_ATTACHED_OBJECTS;x++) { if(IsPlayerAttachedObjectSlotUsed(playerid, x)) format(string, sizeof(string), "%s%d (Used)\n", string, x); else format(string, sizeof(string), "%s%d\n", string, x); } ShowPlayerDialog(playerid, 13501, DIALOG_STYLE_LIST, \ "{FF0000}Attachment Modification - Index Selection", string, "Select", "Cancel"); return 1; }
Код:
if(dialogid == 13501) { 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; }