06.03.2016, 12:06
Hi guys,
I'd like to know how to refresh a textlabel without making it disappear.
If I wasnt clear enough, I'm using a timer system to update stats for warehouses.
It's supposed to update the text label of a warehouse and present the new stats of it(lead and metal), however when I reload a warehouse by using the following stock: ReloadWH(), it makes the label disappear and reappear within a few seconds.
I want it to update the text label live, without making it disappear.
The following code makes the compiler crash:
Anywho, here's the textlabel lines in the stock:
so if you still didnt understand what I'm trying to do - I'm trying to make a text label update itself without disappearing for a few seconds. The text label is the following:
+REPing the helper
I'd like to know how to refresh a textlabel without making it disappear.
If I wasnt clear enough, I'm using a timer system to update stats for warehouses.
It's supposed to update the text label of a warehouse and present the new stats of it(lead and metal), however when I reload a warehouse by using the following stock: ReloadWH(), it makes the label disappear and reappear within a few seconds.
I want it to update the text label live, without making it disappear.
The following code makes the compiler crash:
PHP код:
format(whnamez, sizeof(whnamez), "{40BCFF}[ %s's Warehouse ]\n{AECDE6}Level: {40BCFF}%d\n{AECDE6}Lead: {40BCFF}%s\n{AECDE6}Metal: {40BCFF}%s\n{AECDE6}Materials: {40BCFF}%s", wh[i][whname],wh[i][whlevel],number_format(wh[i][whlead]),number_format(wh[i][whmetal]),number_format(wh[i][whmaterials]), wh[i][outx],wh[i][outy],wh[i][outz]);
Update3DTextLabel(wh[i][whlabel], COLOR_WHITE, whnamez);
PHP код:
stock ReloadWH(i)
{
....
new whnamez[MAX_STRING];
format(whnamez, sizeof(whnamez), "{40BCFF}[ %s's Warehouse ]\n{AECDE6}Level: {40BCFF}%d\n{AECDE6}Lead: {40BCFF}%s\n{AECDE6}Metal: {40BCFF}%s\n{AECDE6}Materials: {40BCFF}%s", wh[i][whname],wh[i][whlevel],number_format(wh[i][whlead]),number_format(wh[i][whmetal]),number_format(wh[i][whmaterials]), wh[i][outx],wh[i][outy],wh[i][outz]);
wh[i][whlabel] = CreateDynamic3DTextLabel(whnamez, COLOR_WHITE, wh[i][outx],wh[i][outy],wh[i][outz]+0.6, 30);
}
PHP код:
new whnamez[MAX_STRING];
format(whnamez, sizeof(whnamez), "{40BCFF}[ %s's Warehouse ]\n{AECDE6}Level: {40BCFF}%d\n{AECDE6}Lead: {40BCFF}%s\n{AECDE6}Metal: {40BCFF}%s\n{AECDE6}Materials: {40BCFF}%s", wh[i][whname],wh[i][whlevel],number_format(wh[i][whlead]),number_format(wh[i][whmetal]),number_format(wh[i][whmaterials]), wh[i][outx],wh[i][outy],wh[i][outz]);
wh[i][whlabel] = CreateDynamic3DTextLabel(whnamez, COLOR_WHITE, wh[i][outx],wh[i][outy],wh[i][outz]+0.6, 30);
}