11.08.2016, 16:42
PHP код:
new dialoglist[700], test[128];
strcat(dialoglist, "Arma\tBalas\tSlot\n");
format(test, 128, "%s\t%d\t1\n",weaponName1,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo1]);
strcat(dialoglist, test);
format(test, 128, "%s\t%d\t2\n",weaponName2,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo2]);
strcat(dialoglist, test);
format(test, 128, "%s\t%d\t3\n",weaponName3,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo3]);
strcat(dialoglist, test);
format(test, 128, "%s\t%d\t4\n",weaponName4,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo4]);
strcat(dialoglist, test);
format(test, 128, "%s\t%d\t5\n",weaponName5,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo5]);
strcat(dialoglist, test);
format(test, 128, "%s\t%d\t6\n",weaponName6,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo6]);
strcat(dialoglist, test);
format(test, 128, "%s\t%d\t7\n",weaponName7,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo7]);
strcat(dialoglist, test);
format(test, 128, "%s\t%d\t8\n",weaponName8,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo8]);
strcat(dialoglist, test);
format(test, 128, "%s\t%d\t9\n",weaponName9,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo9]);
strcat(dialoglist, test);
format(test, 128, "%s\t%d\t10\n",weaponName10,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo10]);
strcat(dialoglist, test);
ShowPlayerDialog(playerid, verarmascarro, DIALOG_STYLE_TABLIST_HEADERS, dialoglist, "Selecionar","Cancelar");