nexquery / samp-textdraw-streamer

A simple plugin for sa-mp and open.mp to break the limits of textdrawings.
Apache License 2.0
33 stars 5 forks source link

Suggestions #4

Closed h3ckphy closed 2 years ago

h3ckphy commented 2 years ago

Selam, kardesim. Can you please rename your functions according to original samp functions? Like CreatePlayerTextDraw, PlayerTextDrawDestroy etc? Also I'd like to see some extra ids in textdraws that can be used in some cases like in this include https://github.com/kristoisberg/samp-td-streamer. For example, I'm developing PlayerTextDrawFade function and I need to hold textdraw's state if it's fading now or not. I could do something like PlayerTextDrawExtra1(playerid, playertextid, value).

nexquery commented 2 years ago

Selam, kardesim.

Since some functions have long names, the names of natives have been shortened. Because I was using the ALS method, the names were reaching the 31 character limit and there was an error in compilation. But you can use Original functions. So you can create textdraw with CreatePlayerTextDraw and delete textdraw with PlayerTextDrawDestroy. No need to use CreatePTextdraw and DestroyPTextdraw :)

As for your second suggestion, I think you want to store a value in textdraw and get it back.

So like this: PlayerTextDrawExtra(playerid, PlayerText:text, value); PlayerTextDrawGetExtra(playerid, PlayerText:text, &value);

I hope I understood your suggestion properly.

h3ckphy commented 2 years ago

Oh, I didn't know that. Thank you.

Yes, you right. For example, in streamer by Incognito for objects, pickups or whatever, there are extra IDs that can be used by developers to hold some values.

nexquery commented 2 years ago

I will add the feature you want soon.

h3ckphy commented 2 years ago

Thanks, bro.

Also I wanted to ask you something, because I barely know C++. How is your streamer implemented? Do you just destroy textdraws when PlayerTextDrawHide is used? And then recreate it when PlayerTextDrawShow() called?

nexquery commented 2 years ago

When PlayerTextdrawHide is used, the existing textdraw is completely removed, so the PlayerTextdrawDestroy action is applied. Textdraw is recreated with CreatePlayerTextdraw when PlayerTextdrawShow is used. In this way, the textdraw limit is exceeded.

nexquery commented 2 years ago

Hello again, the feature you requested has been added. Click

h3ckphy commented 2 years ago

Hi! That's awesome. I hope it's gonna be useful for someone else. I guess issue can be closed. You're cool!