need help in optimization [weird coding]
Can we optimize it? I think I can reduce the code size but unsure. After almost the year of sleeping I forgot most of the amxx scripting :bee:
PHP Code:
|
Re: need help in optimization [weird coding]
Reducing the code size shouldn't be your goal. Do you have a valid reason as to why you want to change the code? If not, leave it as it is.
|
Re: need help in optimization [weird coding]
Pass the string directly no need for reformatting...
PHP Code:
PHP Code:
Also you can use bitsum values for print destination will be be more easy and reliable, same goes for notify type. PHP Code:
|
Re: need help in optimization [weird coding]
Quote:
I had repeating code in some parts of a plugin so i decided to make one stock to call it. Now i just want to make it cleaner to look better. Or I shouldn't aim that? Quote:
Quote:
Quote:
UPD: Is the chat string limit is 192 symbols? |
Re: need help in optimization [weird coding]
Maximum SayText message is 192 characters, so yes.
And the last character ( 191 ) must be EOS ( end of string ) which is equal to 0. |
Re: need help in optimization [weird coding]
Code:
=> Code:
If you're using AMXX 1.9 or 1.10, you don't even need to use get_user_name(): Code:
|
Re: need help in optimization [weird coding]
Quote:
Quote:
|
Re: need help in optimization [weird coding]
Quote:
Quote:
|
Re: need help in optimization [weird coding]
Quote:
Code:
formatex(szTemp, charsmax(szTemp), "%s ", szName) Sure, I can do this to add a space but what's the difference then: Code:
case NAME_ONLY: |
Re: need help in optimization [weird coding]
PHP Code:
|
All times are GMT -4. The time now is 01:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.