23.02.2011, 16:16
Hi.
At TOP of your script you have to declare the 3DTextVariable, let's call it, DialogLabel. And because you want to create more then one, we delare the number you want to have as well. Let's put it to 100, but you can change it.
We also need a vraible to store if the ID was already used:
Now at the OnDialogResponse:
And this is where you remove it (Here we need the ID from upon):
I hope this helps you.
If you have any questions, feel free to ask.
Jeffry
At TOP of your script you have to declare the 3DTextVariable, let's call it, DialogLabel. And because you want to create more then one, we delare the number you want to have as well. Let's put it to 100, but you can change it.
pawn Код:
#define MAX_LABELS_I_USE_AT_MY_DIALOG 100
new Text3D:DialogLabels[MAX_LABELS_I_USE_AT_MY_DIALOG];
pawn Код:
new Used3DTextAtDialog[MAX_LABELS_I_USE_AT_MY_DIALOG];
pawn Код:
new textString3D[98], ID=-1;
format(textString3D,sizeof(textString3D),"%s",inputtext);
for(new i=0; i<MAX_LABELS_I_USE_AT_MY_DIALOG; i++) if(Used3DTextAtDialog[i]==0) ID=i, break;
if(ID==-1) return SendClientMessage(playerid, COLOR_RED, "ERROR: All Dialog-3DTexts are used!"); //If this comes, change 'MAX_LABELS_I_USE_AT_MY_DIALOG' to a higher value.
DialogLabels[ID] = Create3DTextLabel(textString3D,COLOR_WHITE,X,Y,Z,50.0,0,0);
Used3DTextAtDialog[ID]=1; //This will let the server know, that this dialog-3dtext is now in use.
pawn Код:
Remove = strval(inputtext);
Delete3DTextLabel(DialogLabels[Remove]);
Used3DTextAtDialog[Remove]=0; //This will let the server know, that this dialog-3dtext is not used anymore.
If you have any questions, feel free to ask.
Jeffry
![Cool](images/smilies/cool.gif)