Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global TextDraw functions per-player #53

Open
IstuntmanI opened this issue Feb 6, 2017 · 6 comments
Open

Global TextDraw functions per-player #53

IstuntmanI opened this issue Feb 6, 2017 · 6 comments
Milestone

Comments

@IstuntmanI
Copy link

For example, TextDrawSetString sends a RPC to all players, even if they are AFK. With a TextDrawSetStringForPlayer function we could improve it and stop it from affecting AFK players, therefore limiting the RPCs in queue. It will reduce the probability for them to receive a kick for too many RPCs/packets received/sent:
'[warning] client exceeded 'messageslimit' IP:port (X) Limit: Y/sec'
'[warning] client exceeded 'messageholelimit' IP:port (X) Limit: Y'
(not sure which one of them is caused by those RPCs sent to AFK players, probably the 'messageslimit' one)

@ghost ghost self-assigned this Feb 6, 2017
@ghost ghost added the enhancement label Feb 6, 2017
@ghost ghost added this to the R19 milestone Feb 6, 2017
@ghost
Copy link

ghost commented Feb 6, 2017

f9394c9#diff-87dfefaed993171c340cac919e651cb6R3566

@IstuntmanI
Copy link
Author

Great. Other global textdraw functions should also have per-player alternatives:

native TextDrawLetterSize(Text:text, Float:x, Float:y);
native TextDrawTextSize(Text:text, Float:x, Float:y);
native TextDrawAlignment(Text:text, alignment);
native TextDrawColor(Text:text, color);
native TextDrawUseBox(Text:text, use);
native TextDrawBoxColor(Text:text, color);
native TextDrawSetShadow(Text:text, size);
native TextDrawSetOutline(Text:text, size);
native TextDrawBackgroundColor(Text:text, color);
native TextDrawFont(Text:text, font);
native TextDrawSetProportional(Text:text, set);
native TextDrawSetSelectable(Text:text, set);
native TextDrawSetString(Text:text, string[]);
native TextDrawSetPreviewModel(Text:text, modelindex);
native TextDrawSetPreviewRot(Text:text, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fZoom = 1.0);
native TextDrawSetPreviewVehCol(Text:text, color1, color2);

(if it is possible for everything)

@ghost
Copy link

ghost commented Feb 6, 2017

It's possible, but from my view it would be very messy. Global textdraws, globals for player & player textdrwas. wtf :D

@IstuntmanI
Copy link
Author

Yeah, I know. Haha. But it helps with the thing I described, bandwidth saving.

@ghost
Copy link

ghost commented Feb 7, 2017

If you do it, create a pull request i will merge it xD its not reall hard just time consuming which is problem for me at the moment.

@ghost
Copy link

ghost commented Feb 7, 2017

Hmm might i will do it..

@ghost ghost removed their assignment Dec 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant