01.08.2013, 12:35
okey, lets say, this is your textdraw:
now if you would like to make it clickable, we add
"TextDrawSetSelectable(AT_M_TD[3],1);"
to it. But we're not done yet, to tell the server wich area is clickable,
we edit: "TextDrawTextSize(AT_M_TD[3], 256.000000, 0.000000);"
we will edit the Y acis part, as the X axis is always fine.
lets say we add 22 to the Y axis, the textdraw would now look like:
and is clickable
Код:
AT_M_TD[3] = TextDrawCreate(179.000000, 336.000000, "News-Heli~n~~g~120000$"); TextDrawBackgroundColor(AT_M_TD[3], 255); TextDrawFont(AT_M_TD[3], 1); TextDrawLetterSize(AT_M_TD[3], 0.500000, 1.200000); TextDrawColor(AT_M_TD[3], -1); TextDrawSetOutline(AT_M_TD[3], 0); TextDrawSetProportional(AT_M_TD[3], 1); TextDrawSetShadow(AT_M_TD[3], 1); TextDrawUseBox(AT_M_TD[3], 1); TextDrawBoxColor(AT_M_TD[3], -2038003969); TextDrawTextSize(AT_M_TD[3], 256.000000, 0.000000);
"TextDrawSetSelectable(AT_M_TD[3],1);"
to it. But we're not done yet, to tell the server wich area is clickable,
we edit: "TextDrawTextSize(AT_M_TD[3], 256.000000, 0.000000);"
we will edit the Y acis part, as the X axis is always fine.
lets say we add 22 to the Y axis, the textdraw would now look like:
Код:
AT_M_TD[3] = TextDrawCreate(179.000000, 336.000000, "News-Heli~n~~g~120000$"); TextDrawBackgroundColor(AT_M_TD[3], 255); TextDrawFont(AT_M_TD[3], 1); TextDrawLetterSize(AT_M_TD[3], 0.500000, 1.200000); TextDrawColor(AT_M_TD[3], -1); TextDrawSetOutline(AT_M_TD[3], 0); TextDrawSetProportional(AT_M_TD[3], 1); TextDrawSetShadow(AT_M_TD[3], 1); TextDrawUseBox(AT_M_TD[3], 1); TextDrawBoxColor(AT_M_TD[3], -2038003969); TextDrawTextSize(AT_M_TD[3], 256.000000, 22.000000); TextDrawSetSelectable(AT_M_TD[3],1);

