What is more efficient playertextdraw
#1

What is more efficient

Create and destroy, to show and hide and avoid the limit
CreatePlayerTextdraw
PlayerTextdrawDestroy

or create the textdraw in OnPlayerConnect and

PlayerTextdrawShow
PlayerTextdrawHide
Reply
#2

well the limit of textdraws according to samp wiki limits is
Global textdraws 2048
textdraws per player 256
so i dont think you have needed that much text draw so show and hide textdraws would be better and setting textdraws string to change them wont be problem incase if you have more than that limit ye you need to destroy textdraws but comeone 256 textdraws for one player ?

anyway if you needed more there is alot of includes and plugins which supports higher limited textdraws but in all of them only few textdraws can be showen at same time to player


also creating textdraws each time is just unnessery memory usage

but if you need them just make common textdraws in connect and show and hide them

and just create and destroy textdraws if they are rarely used like maybe a player never used that
Reply
#3

Depends on how you use textdraws you shouldn't really have to worry for the most part but rule of thumb is any individual output to a player should be a player textdraw all others just regular textdraws.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)