TextDrawSetString with textures -
OKStyle - 27.09.2014
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
Re: TextDrawSetString with textures -
Pottus - 27.09.2014
It's not a bug at all you need to hide the textdraw before doing that then show again.
Re: TextDrawSetString with textures -
OKStyle - 27.09.2014
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.
Re: TextDrawSetString with textures -
Pottus - 27.09.2014
can you make a small test filterscript then ?
Re: TextDrawSetString with textures -
OKStyle - 27.09.2014
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
Re: TextDrawSetString with textures -
V1ceC1ty - 29.09.2014
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.
Re: TextDrawSetString with textures -
vignesh007 - 29.09.2014
Quote:
Originally Posted by Pottus
It's not a bug at all you need to hide the textdraw before doing that then show again.
|
^^^^
Re: TextDrawSetString with textures -
Pottus - 29.09.2014
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.