textdraw help
#1

pawn Код:
new Text:Ann;
under OnGameModeInit
pawn Код:
Ann = TextDrawCreate(70.000000, 326.000000,"_");
    TextDrawTextSize(Ann, 200.0, 200.0); // tried changing them but doesnt get big
    TextDrawUseBox(Ann, 1);
    TextDrawBoxColor(Ann, 0x00000076);
    TextDrawAlignment(Ann, 2);
    TextDrawBackgroundColor(Ann,0x000000FF);
    TextDrawFont(Ann, 1);
    TextDrawLetterSize(Ann, 0.3,1);
    TextDrawColor(Ann, 0xffffffff);
    TextDrawSetShadow(Ann, 1);
i put it under /cmds command.

pawn Код:
new newtext[41];
    format(newtext, sizeof(newtext), "/cars - the list of cars ~n~ /teles - list of teles. ~n~ /help- Teach u How To play.");//, name);
    TextDrawSetString(Ann, newtext);
    TextDrawShowForAll(Ann);
the problem is i cant see all things i listed there for /cmds. its ending at /teles - li. i tried to make the box big but its not letting me .

also i want to make it like when i press LMB or capslock its should close.
Reply
#2

pawn Код:
new newtext[85];
    format(newtext, sizeof(newtext), "/cars - the list of cars ~n~ /teles - list of teles. ~n~ /help- Teach u How To play.");//, name);//string length was too little
    TextDrawSetString(Ann, newtext);
    TextDrawShowForAll(Ann);
Try that
Reply
#3

ty. how to make it close when pressing LMB or capslock?
Reply
#4

OnPlayerKeyStateChange

pawn Код:
if (newkeys == KEY_FIRE)
{
TextDrawHideForAll(Ann);
//or
TextDrawHideForPlayer(Ann);
}
Try that...
Reply
#5

how to define newkeys?
Reply
#6

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys == KEY_FIRE)
{
TextDrawHideForAll(Ann);
//or
TextDrawHideForPlayer(Ann);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)