Dialog Tab (\t)
#1


Only using one \t before the last item makes it not work if the previous item is too short. How can I fix this?

pawn Код:
format(ostick_dialog_string, sizeof(ostick_dialog_string), "%s\nSlot: %i\tModel: %i\tBone: %s\tTest: lols", ostick_dialog_string, i, ostick[playerid][i][os_model], ostick_bones[ostick[playerid][i][os_bone]]);
You will probably say have them pre-defined in my array of bone strings, but what if it was a user-entered text? Any help with this is appriciated.

EDIT: Tried using three \t's now:

Slot: %i\tModel: %i\tBone: %s\t\t\tTest: lols





(I know the string isn't long enough - it's not relevant though)


EDIT #2:
For now I've just had to pre-define how many \t's each bone needs:

pawn Код:
new ostick_bones[][] = {
"","Spine\t\t", "Head\t\t", "Left Upper Arm\t", "Right Upper Arm\t", "Left Hand\t", "Right hand\t", "Left Thigh\t", "Right Thigh\t", "Left Foot\t\t", "Right Foot\t", "Left Calf\t\t", "Right Calf\t", "Left Forearm\t", "Right Forearm\t", "Left Shoulder\t", "Right Shoulder\t", "Neck\t\t", "Jaw\t\t"
};
Would like to know if there's a way around this though.
Reply
#2

Try
Slot: %i\tModel: %i\tBone: %24s\tTest: lols
Reply
#3

Well I sorted it by pre-defining them, looks good:

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)