01.05.2015, 18:17
I'll take some code from my system here.
First I create my text label.
Next I update my label.
Finally I delete my label.
Now all this works fine, but let's say there are 4 systems using labels, weed, bombs, cars, etc.. How do I ensure these do not conflict? Hopefully you understand.
First I create my text label.
PHP код:
new labelText[128];
format(labelText, sizeof(labelText), "{FFFFFF}Planted by %s; ID %i\n{FE642E}0 Percent Completed\n{FFFFFF}/seizeweed", GetUserName(playerid), individualSlot);
weedData[slotToUse][weedLabel] = Create3DTextLabel(labelText, COLOR_YELLOW, weedData[slotToUse][weedPosition][0], weedData[slotToUse][weedPosition][1], (weedData[slotToUse][weedPosition][2] - 0.5), 30, GetPlayerVirtualWorld(playerid), 0);
PHP код:
format(labelText, sizeof(labelText), "{FFFFFF}Planted by %s; ID %i\n{58D3F7}ready to /harvest\n{FFFFFF}/seizeweed", GetUserName(weedData[i][weedOwner]), i, weedData[i][weedStatus]);
Update3DTextLabelText(weedData[i][weedLabel], COLOR_WHITE, labelText);
PHP код:
Delete3DTextLabel(weedData[i][weedLabel]);