25.07.2018, 22:00
Hey. My code writes all furniture ID's that is in the house. Problem in it, that text is writing in column. If house have a lot of furniture, column will be very long.. Maybe somebody can help me with it? I want to recreate or update this code. For example if it possible to create more (2-3) columns? Or maybe use LIST dialog style? But I need to enter id of furniture, to edit it :/
Код:
new msg[128]; format(MSG,sizeof(MSG),"\0"); for(new i = 0; i < oInf[playerDB[playerid][house]][furn]+1; i++) { if(oInf[playerDB[playerid][house]][objectid][i]!=0) { format(msg,sizeof(msg),"%i. %i",i,oInf[playerDB[playerid][house]][modelid][i]); strcat(MSG,msg); strcat(MSG,"\n"); } } format(msg,sizeof(msg)," All furniture: %i\nEnter ID",oInf[playerDB[playerid][house]][furn]); strcat(MSG,msg); ShowPDialog(playerid,8658,DIALOG_STYLE_INPUT,"Furniture",MSG,"ok","ok");