• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] [SOLVED] How use DIALOG_STYLE_TABLIST_HEADERS with loops for function wrong format
#1
SOLUTION:?

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");

? ? ? ? ? ?
  Reply


Forum Jump: