12.02.2018, 11:35
There is a better way:
EDIT: fixed name of the variable
Код:
new TextLabels = 0; // on the top of your script
// somewhere in your script
Text3D:Create3DTextLabelEx(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, VirtualW, testLOS = 0)
{
TextLabels += 1;
return Create3DTextLabel(text, color, X, Y, Z, DrawDistance, VirtualW, testLOS);
}
Delete3DTextLabelEx(Text3D:id)
{
TextLabels -=1;
return Delete3DTextLabel(Text3D:id);
}
How to use:
Use "Create3DTextLabelEx" instead of "Create3DTextLabel"
and "Delete3DTextLabelEx" instead of "Delete3DTextLabel"
printf("%d", TextLabels); // print number of created labels

