17.11.2018, 18:16
Quote:
Add
Code:
Delete3DTextLabel(afklable[i]); Code:
afklable[i] = Create3DTextLabel(str, COLOR_CYAN, 30.0, 40.0, 50.0, 40.0, 0); |
Quote:
alright now i have another problem , its just show for 1 person , if another player afk at the same time other guy who was esc will lose his 3dtext
|
Initialize the array for each player with an invalid ID in OnPlayerConnect, eg. INVALID_3DTEXT_ID. Then in the timer, check if the ID you want to delete is valid before deleting.
When you finally delete the label when the player returns, set player's array slot to INVALID_3DTEXT_ID again.
That way you ensure no unrelated Labels get deleted.
You can also switch to Update3DTextLabelText instead of recreating so this wouldn't be a problem.