Textdraw string
#1

Hey! I got a strange problem with my textdraw. I have created a textdraw which shows to a player when he typed command for any animation. String of the textdraw is "SPACE to stop animation", but when I write in game, for example /sit command, I got textdraw with text "/REPORT". I don't have any textdraw created which contains text /report and I really don't know why is this happening.This is the code:
pawn Код:
new Text:txtAnimHelper;
.
.
.
        txtAnimHelper = TextDrawCreate(610.0, 400.0, "~r~SPACE ~w~to stop the animation");
    TextDrawUseBox(txtAnimHelper, 0);
    TextDrawFont(txtAnimHelper, 2);
    TextDrawSetShadow(txtAnimHelper,0);
    TextDrawSetOutline(txtAnimHelper,1);
    TextDrawBackgroundColor(txtAnimHelper,0x000000FF);
    TextDrawColor(txtAnimHelper,0xFFFFFFFF);
    TextDrawAlignment(txtAnimHelper,3);
Can somebody help me because I tried everything, but I can't fix my problem. Thank you.
Reply
#2

These inside OnGameModeInit
pawn Код:
txtAnimHelper = TextDrawCreate(610.0, 400.0, "~r~SPACE ~w~to stop the animation");
    TextDrawUseBox(txtAnimHelper, 0);
    TextDrawFont(txtAnimHelper, 2);
    TextDrawSetShadow(txtAnimHelper,0);
    TextDrawSetOutline(txtAnimHelper,1);
    TextDrawBackgroundColor(txtAnimHelper,0x000000FF);
    TextDrawColor(txtAnimHelper,0xFFFFFFFF);
    TextDrawAlignment(txtAnimHelper,3);
When they type a command for animation:
pawn Код:
TextDrawShowForPlayer(playerid, txtAnimHelper);
Reply
#3

I got all that, textdraw is created under OnGamemodeInit, and its shown to a player when he uses command for any animation.
Reply
#4

Well if you want to be 100 percent sure that it will show that message, then do:
pawn Код:
TextDrawSetString(txtAnimHelper, "~r~SPACE ~w~to stop the animation");
TextDrawShowForPlayer(playerid, txtAnimHelper);
whenever a player uses an animation command.
Reply
#5

Thanks, it works now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)