SayText problem.
I'm tryng to make a plugin who block multiple prints( an user who prints more times the same text ).
Problem is acting in the next way: Is check and let first propozition(when i entry to server) THEN IT's BLOCKING Everything without scan, or is a wrong formating string message, i realy dunno... Here's the code: Code:
|
Re: SayText problem.
Solved.
Code:
|
Re: SayText problem.
[en] hey, why do you use boolean string copy to catch first say message?
[RO] Nu inteleg, de ce folosesti booleanul si copy, de ce nu folosesti deodata formatex, faci asta cu scopul ca sa fie eficient sau ...? |
Re: SayText problem.
Quote:
But you're right, in my case formatex() should be removed. |
Re: SayText problem.
Yes, copy is more efficient than formatex because it only copies the string, not edits it.So ya, if you don't need to edit, it's better to use copy.
Also for better performance I suggest you to check if msg[0]!=EOS and not do copy string,just return continue,because empty message is not printed, being blocked by default client engine. |
Re: SayText problem.
Quote:
|
Re: SayText problem.
yes, its working without that but as I said it will be more efficient for amxx
There is no sense to copy empty string. |
Re: SayText problem.
Quote:
Code:
If Msg is not empty will be copyed. in gLastUserMessage.. Edit: is working perfect, for more suggestion please post here: https://forums.alliedmods.net/showthread.php?t=279042 |
Re: SayText problem.
yes, now it's pretty nice. :)
|
| All times are GMT -4. The time now is 09:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.