Update3DTextLabel [+REP]
#1

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:
PHP код:
    format(whnamezsizeof(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_WHITEwhnamez); 
Anywho, here's the textlabel lines in the stock:
PHP код:
stock ReloadWH(i)
{
....
    new 
whnamez[MAX_STRING];
    
format(whnamezsizeof(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(whnamezCOLOR_WHITEwh[i][outx],wh[i][outy],wh[i][outz]+0.630);

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:
PHP код:
    new whnamez[MAX_STRING];
    
format(whnamezsizeof(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(whnamezCOLOR_WHITEwh[i][outx],wh[i][outy],wh[i][outz]+0.630);

+REPing the helper
Reply


Messages In This Thread
Update3DTextLabel [+REP] - by Amit1998 - 06.03.2016, 12:06
Re: Update3DTextLabel [+REP] - by Amit1998 - 06.03.2016, 12:32
Re: Update3DTextLabel [+REP] - by Amit1998 - 06.03.2016, 20:54
Re: Update3DTextLabel [+REP] - by nerovani - 06.03.2016, 21:45
Re: Update3DTextLabel [+REP] - by Amit1998 - 07.03.2016, 10:15
Re: Update3DTextLabel [+REP] - by PrO.GameR - 07.03.2016, 11:54
Re: Update3DTextLabel [+REP] - by thefirestate - 07.03.2016, 14:10
Re: Update3DTextLabel [+REP] - by Amit1998 - 07.03.2016, 15:45

Forum Jump:


Users browsing this thread: 2 Guest(s)