TextDrawSetString with textures
#1

Don't work set string with texture name in ClickTextDraw public...

pawn Код:
TextDrawInfo[i][tdID] = TextDrawCreate(..., "ld_beat:circle"); // create texture
...
TextDrawSetString(TextDrawInfo[i][tdID], "ld_beat:cross"); // change texture
Reply
#2

It's not a bug at all you need to hide the textdraw before doing that then show again.
Reply
#3

No, I tried it earlier, not working:
pawn Код:
TextDrawHideForPlayer(playerid, TextDrawInfo[i][tdID]);
TextDrawSetString(TextDrawInfo[i][tdID], "ld_beat:cross");
TextDrawShowForPlayer(playerid, TextDrawInfo[i][tdID]);
And in the speedometrs system i'm not hide/show for update.
Reply
#4

can you make a small test filterscript then ?
Reply
#5

pawn Код:
new Text:TextDrawInfo;
public OnFilterScriptInit()
{
    TextDrawInfo = TextDrawCreate(200.0, 200.0, "ld_beat:circle");
    TextDrawTextSize(TextDrawInfo, 20.0, 20.0);
    TextDrawSetSelectable(TextDrawInfo, 1);
    TextDrawFont(TextDrawInfo, 4);
    return 1;
}
public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid, TextDrawInfo);
    SelectTextDraw(playerid, 0xFF0000FF);
    return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == TextDrawInfo)
    {
        TextDrawSetString(clickedid, "ld_beat:cross");
    }
    return 1;
}
It's works here... I don't understand... Try to set on the blank gamemode... Or it was error in enum's IDs.

upd: works fine, it was wrong ids on the ClickTextDraw public.... v__v
Reply
#6

Quote:
Originally Posted by Pottus
Посмотреть сообщение
It's not a bug at all you need to hide the textdraw before doing that then show again.
You don't actually need to hide it and show it again. SetString works fine for textdraw font 4, it's only textdraw models/font 5 that has to be hidden/shown to be updated.
Reply
#7

Quote:
Originally Posted by Pottus
Посмотреть сообщение
It's not a bug at all you need to hide the textdraw before doing that then show again.
^^^^
Reply
#8

Quote:
Originally Posted by V1ceC1ty
Посмотреть сообщение
You don't actually need to hide it and show it again. SetString works fine for textdraw font 4, it's only textdraw models/font 5 that has to be hidden/shown to be updated.
Yeah that would seem to be the case also colors you need to hide/show.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)