Is there a way to know how many 3D Text Label's my server haves?
#3

There is a better way:

Код:
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
EDIT: fixed name of the variable
Reply


Messages In This Thread
Is there a way to know how many 3D Text Label's my server haves? - by Eibison - 12.02.2018, 10:40
Re: Is there a way to know how many 3D Text Label's my server haves? - by Eoussama - 12.02.2018, 11:19
Re: Is there a way to know how many 3D Text Label's my server haves? - by Hrb - 12.02.2018, 11:35
Re: Is there a way to know how many 3D Text Label's my server haves? - by Eoussama - 12.02.2018, 11:54
Re: Is there a way to know how many 3D Text Label's my server haves? - by Hrb - 12.02.2018, 12:01

Forum Jump:


Users browsing this thread: 1 Guest(s)