SA-MP Forums Archive
3D Text Label update - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3D Text Label update (/showthread.php?tid=280737)



3D Text Label update - Kalli749 - 02.09.2011

Hello

i want to make a 3D Text Label which updates itself when someone has harvested the field.

Код:
new Farmerlabel;
Код:
Update3DTextLabelText(Farmerlabel, 0xFFFFFFFF, "Drogenlager: %d.", FarmerDrugs);
Код:
Farmerlabel = Create3DTextLabel("Drogenlager: %d", FarmerDrogen, 0xFFFF00AA,-100.2003,-59.9764,3.1172,15,50,0);
But it don't work..

I hope someone can help me.

Best regards


Re: 3D Text Label update - Kingunit - 02.09.2011

'it don't work' What isn't working? You are getting errors? Explain something more ...


Re: 3D Text Label update - Kyle_Olsen - 02.09.2011

Use these instead:
Код:
new Farmerlabel, string[128];
Код:
format(string, sizeof(string), "Drogenlager: %d", FarmerDrugs);
Update3DTextLabelText(Farmerlabel, 0xFFFFFFFF, string);
Код:
format(string, sizeof(string), "Drogenlager: %d", FarmerDrogen);
Farmerlabel = Create3DTextLabel(string, 0xFFFF00AA,-100.2003,-59.9764,3.1172,15,50,0);



AW: 3D Text Label update - Kalli749 - 02.09.2011

Hi Keyle and thanks for your quick response!

I did what you say. Now i get warnings:

Код:
C:\Users\Administrator\Desktop\feuertest.pwn(8693) : warning 213: tag mismatch
C:\Users\Administrator\Desktop\feuertest.pwn(16543) : warning 213: tag mismatch

Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Line 8693

Код:
format(farmstring, sizeof(farmstring), "Drogenlager: %d", FarmerDrogen);
Update3DTextLabelText(Farmerlabel, 0xFFFFFFFF, farmstring);
Line 16543

Код:
format(farmstring, sizeof(farmstring), "Drogenlager: %d", FarmerDrogen);
Farmerlabel = Create3DTextLabel(farmstring, 0xFFFF00AA,-100.2003,-59.9764,3.1172,15,50,0);
Best regards


Re: 3D Text Label update - Kyle_Olsen - 02.09.2011

Are you sure that you defined the length of farmstring?
like new farmstring[128];


AW: 3D Text Label update - Kalli749 - 02.09.2011

yes i did


Re: 3D Text Label update - Ash. - 02.09.2011

The errors say it all. You should be looking at tags, not variable names...

pawn Код:
new FarmerLabel;
//Should be
new Text3D:FarmerLabel;
Enjoy


AW: 3D Text Label update - Kalli749 - 03.09.2011

oh thanks it works


Re: AW: 3D Text Label update - Ash. - 03.09.2011

Quote:
Originally Posted by Kalli749
Посмотреть сообщение
oh thanks it works
Good

Glad I could help!