Text label formatting help.
#1

Hi guys,
I would like to know if it is possible to format something and choose it as a 3dtextlabel text. Example:

PHP код:
new string[50];
format(string,sizeof(string), "you're id %d"playerid);
Create3DTextLabel(string,COLOR_GREEN30.040.050.040.000); 
Any chance we can do it? because i tried and it gave me tag mismatch
Reply
#2

Your code is perfect I'm sure the problem is on
PHP код:
COLOR_GREEN 
Try changing it to -1 and see result
Reply
#3

Yes, it's possible. See this thread (https://sampforum.blast.hk/showthread.php?tid=606806) for an example.
Reply
#4

tried. My real code that im trying to use is:

PHP код:
new statusstring[250]
format(statusstringsizeof(statusstring), "Info Planta: \nEm crescimento.\n ID %d"drogasid);
                                
drogastatus[drogasid] = CreatePlayer3DTextLabel(playerid,statusstring,-1,sementeposX[drogasid],sementeposY[drogasid],sementeposZ[drogasid],10.0,0); 
Reply
#5

You have to put "Text3D:" in front of the declaration of the variable.

pawn Код:
new Text3D:drogastatus[what_you_have_here];
See https://sampwiki.blast.hk/wiki/Create3DTextLabel & https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer. The declaration using "Text3D:" is in the 2nd link.
Reply
#6

new Text3d:drogastatus[200];
the 200 is for the object id's
Reply
#7

Quote:
Originally Posted by GunZsmd
Посмотреть сообщение
new Text3d:drogastatus[200];
the 200 is for the object id's
As first point, capitalize the "d" -> "Text3D:".

Secondly, use an enumerator. Example:
pawn Код:
enum e_variable
{
    object,
    Text3D:label
};

new variable[200][e_variable];
pawn Код:
drogastatus[drogasid][label] = CreatePlayer3DTextLabel(playerid,statusstring,-1,sementeposX[drogasid],sementeposY[drogasid],sementeposZ[drogasid],10.0,0);
Reply
#8

so should i replace drogasid for the enumerator?
Reply
#9

pawn Код:
[id/slot/index][enumerator elements]
So, no. You now have two set of brackets.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)