2021-05-25, 04:09 AM
(This post was last modified: 2021-05-25, 04:21 AM by PutuSuhartawan.)
SOLUTION:?
Put The format before for loops function
Problem:
How put?"COL_RED"SQL ID\t"COL_BLUE"Items\t"COL_GREEN"Amount\n in the right place?
Put The format before for loops function
Code:
new trunkdataslot1items[1000];
format(trunkdataslot1items, sizeof(trunkdataslot1items), ""COL_RED"SQL ID\t"COL_BLUE"Items\t"COL_GREEN"Amount\n");
? ? ? ? ? ? for(new s; s < MAX_TRUNK_SLOTS; s )
? ? ? ? ? ? {
? ? ? ? ? ? ? ?
? ? ? ? ? ? format(trunkdataslot1items, sizeof(trunkdataslot1items),
? ? ? ? ? ? " %s %i \t"COL_GREEN" %s \t "COL_RED"%i %s \n",
? ? ? ? ? ? trunkdataslot1items, get_vehicle_trunk[closestcar][s][TRUNK_SQL_ID], GetItemInfo( get_vehicle_trunk[closestcar][s][TRUNK_ITEM_TYPE], I_NAME), get_vehicle_trunk[closestcar][s][TRUNK_ITEM_AMOUNT], GetItemInfo( get_vehicle_trunk[closestcar][s][TRUNK_ITEM_TYPE], I_NAME_COUNT)? );
? ? ? ? ? ? printf("[TRUNK]: Slot:[%i], SQL ID:[%d], Item Type:[%d], Amount:[%d], ", s, get_vehicle_trunk[closestcar][s][TRUNK_SQL_ID], get_vehicle_trunk[closestcar][s][TRUNK_ITEM_TYPE],? get_vehicle_trunk[closestcar][s][TRUNK_ITEM_AMOUNT]);
? ? ? ? ? ? }
? ? ? ? ? ShowPlayerDialog(playerid, DIALOG_OPEN_VEHICLE_TRUNK, DIALOG_STYLE_TABLIST_HEADERS, DialogTitle , trunkdataslot1items, "Take it", "Close");
? ? ? ? ? ?
Problem:
How put?"COL_RED"SQL ID\t"COL_BLUE"Items\t"COL_GREEN"Amount\n in the right place?
Code:
? ? ? ? ? ? for(new s; s < MAX_TRUNK_SLOTS; s )
? ? ? ? ? ? {
? ? ? ? ? ? ? ?
? ? ? ? ? ? format(trunkdataslot1items, sizeof(trunkdataslot1items),
? ? ? ? ? ? " %s %i \t"COL_GREEN" %s \t "COL_RED"%i %s \n",
? ? ? ? ? ? trunkdataslot1items, get_vehicle_trunk[closestcar][s][TRUNK_SQL_ID], GetItemInfo( get_vehicle_trunk[closestcar][s][TRUNK_ITEM_TYPE], I_NAME), get_vehicle_trunk[closestcar][s][TRUNK_ITEM_AMOUNT], GetItemInfo( get_vehicle_trunk[closestcar][s][TRUNK_ITEM_TYPE], I_NAME_COUNT)? );
? ? ? ? ? ? printf("[TRUNK]: Slot:[%i], SQL ID:[%d], Item Type:[%d], Amount:[%d], ", s, get_vehicle_trunk[closestcar][s][TRUNK_SQL_ID], get_vehicle_trunk[closestcar][s][TRUNK_ITEM_TYPE],? get_vehicle_trunk[closestcar][s][TRUNK_ITEM_AMOUNT]);
? ? ? ? ? ? }
? ? ? ? ? ShowPlayerDialog(playerid, DIALOG_OPEN_VEHICLE_TRUNK, DIALOG_STYLE_TABLIST_HEADERS, DialogTitle , trunkdataslot1items, "Take it", "Close");
? ? ? ? ? ?