05.11.2016, 08:04
Hi i made some textdraws for event system. Like admin typed /event the textdraws will show up but here is the big g problem.
The string should remain within the box but it gets out of the box. Isn't there anyway to make it stay within the box?
PHP код:
Textdraw15 = TextDrawCreate(639.000000, 320.699981, "usebox");
TextDrawLetterSize(Textdraw15, 0.000000, 10.758892);
TextDrawTextSize(Textdraw15, 413.000000, 0.000000);
TextDrawAlignment(Textdraw15, 1);
TextDrawColor(Textdraw15, 0);
TextDrawUseBox(Textdraw15, true);
TextDrawBoxColor(Textdraw15, -16382411);
TextDrawSetShadow(Textdraw15, 0);
TextDrawSetOutline(Textdraw15, 0);
TextDrawFont(Textdraw15, 0);
Textdraw16 = TextDrawCreate(639.000000, 300.540008, "usebox");
TextDrawLetterSize(Textdraw16, 0.000000, 1.861111);
TextDrawTextSize(Textdraw16, 413.000000, 0.000000);
TextDrawAlignment(Textdraw16, 1);
TextDrawColor(Textdraw16, 0);
TextDrawUseBox(Textdraw16, true);
TextDrawBoxColor(Textdraw16, -16382209);
TextDrawSetShadow(Textdraw16, 0);
TextDrawSetOutline(Textdraw16, 0);
TextDrawFont(Textdraw16, 0);
Textdraw17 = TextDrawCreate(485.000000, 301.279998, "EVENT INFO");
TextDrawLetterSize(Textdraw17, 0.449999, 1.600000);
TextDrawAlignment(Textdraw17, 1);
TextDrawColor(Textdraw17, -1);
TextDrawSetShadow(Textdraw17, 0);
TextDrawSetOutline(Textdraw17, 1);
TextDrawBackgroundColor(Textdraw17, 51);
TextDrawFont(Textdraw17, 1);
TextDrawSetProportional(Textdraw17, 1);
Textdraw18 = TextDrawCreate(475.000000, 334.320007, "");
TextDrawLetterSize(Textdraw18, 0.449999, 1.600000);
TextDrawAlignment(Textdraw18, 2);
TextDrawColor(Textdraw18, -1);
TextDrawSetShadow(Textdraw18, 0);
TextDrawSetOutline(Textdraw18, 1);
TextDrawBackgroundColor(Textdraw18, 51);
TextDrawFont(Textdraw18, 1);
TextDrawSetProportional(Textdraw18, 1);
PHP код:
CMD:event(playerid, params[])
{
if(pInfo[playerid][pLevel] >= 5)
{
new info[120];
if(sscanf(params,"s[120]",info)) return SCM(playerid,COLOR_ORANGE,"USAGE: /event (information)");
TextDrawShowForAll(Textdraw15);
TextDrawShowForAll(Textdraw16);
TextDrawShowForAll(Textdraw17);
TextDrawShowForAll(Textdraw18);
TextDrawSetString(Textdraw18, info);
}
return 1;
}