You don't need "PHONE_IDS", i made that for wepons dialog because weaponid and weapon model have different values.
PHP код:
new PHONE_MODELS[] = {
18871, 18872, 18874, 18866
};
new PHONE_NAMES[][] = {
"iPhone", "Samsung", "Nokia", "Motorola"
};
CMD:phones(playerid) {
// for adjusting every model rotation
for (new i = 0; i < sizeof(PHONE_MODELS); i++) {
SetDialogPreviewRotation(playerid, i, rx, ry, rz, zoom); // put your values here
}
return ShowPreviewModelDialog(playerid, 0, "Phone Selection Dialog", PHONE_MODELS, PHONE_NAMES, "Select", "Cancel");
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
if (dialogid == 0) {
if (response) {
switch (listitem) {
case 0: {} // iphone
case 1: {} // samsung
// and so on....
}
}
}
return 1;
}