Raised This Month: $32 Target: $400
 8% 

AGM + AimGlow v2.0.2 [24/04/2020]


Post New Thread Reply   
 
Thread Tools Display Modes
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-13-2020 , 10:30   Re: Advanced GlowMenu v2.0.0 [12/04/2020]
Reply With Quote #21

Quote:
Originally Posted by OciXCrom View Post

8.

Code:
log_amx("%s", szLine);

=>

Code:
log_amx(szLine);

Should this even be in the code? Pretty sure you forgot to remove it when testing. Just debug purposes in case anyone gets errors later on. Easier for me than explaining to people what to do.

10. Line 360:

Code:
for(new i; i < ArraySize(aColorInfo); i++) {

The array size won't ever change, so cache it in a global variable after reading the file. What do you mean with this? could you give me an example? I get the fact that the array size will never change, but why do i need to cache it?
Everything else is fixed and ready to get updated. Big thanks for your feedback already.

Also, i tried using this:
PHP Code:
 iMainMenu menu_create("MAIN_MENU_HEADER""MainMenuHandler"true); 
But it's not working, it's just showing "MAIN_MENU_HEADER"
__________________

Last edited by Napoleon_be; 04-13-2020 at 10:38.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-13-2020 , 10:49   Re: Advanced GlowMenu v2.0.0 [12/04/2020]
Reply With Quote #22

Quote:
What do you mean with this? could you give me an example? I get the fact that the array size will never change, but why do i need to cache it?
for(initialization; condition; step)
In a loop, the condition is tested on each iteration.

Your condition is something like: i < ArraySize(). What happens is after each iteration the plugin has to call ArraySize in order to be able to compare it with "i".
If you cache it into a variable then you can use that in the loop condition and avoid calling the native for each step.

Code:
i = 0: execute your code, call ArraySize, compare with i, increment
i = 1: execute your code, call ArraySize, compare with i, increment
...
i = k: execute your code, call ArraySize, compare with i, increment
...

With caching:
i = 0: execute your code, compare variable with i, increment
i = 1: execute your code, compare variable with i, increment
...
i = k: execute your code, compare variable with i, increment
...
You don't need to do that for loops using sizeof and regular arrays, because their size is known at compile time.
__________________

Last edited by HamletEagle; 04-13-2020 at 10:54.
HamletEagle is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-13-2020 , 10:56   Re: Advanced GlowMenu v2.0.0 [12/04/2020]
Reply With Quote #23

Quote:
Originally Posted by HamletEagle View Post
for(initialization; condition; step)
In a loop, the condition is tested on each iteration.

Your condition is something like: i < ArraySize(). What happens is after each iteration the plugin has to call ArraySize in order to be able to compare it with "i".
If you cache it into a variable then you can use that in the loop condition and avoid calling the native for each step.

Code:
i = 0: execute your code, call ArraySize, compare with i, increment
i = 1: execute your code, call ArraySize, compare with i, increment
...
i = k: execute your code, call ArraySize, compare with i, increment
...

With caching:
i = 0: execute your code, compare variable with i, increment
i = 1: execute your code, compare variable with i, increment
...
i = k: execute your code, compare variable with i, increment
...
You don't need to do that for loops using sizeof and regular arrays, because their size is known at compile time.
PHP Code:
new iColorSize
PHP Code:
iColorSize ArraySize(aColorInfo); 
PHP Code:
for(new iiColorSizei++) {


Something like this? Tried it and it worked so i guess it's right.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-13-2020 , 11:07   Re: Advanced GlowMenu v2.0.0 [12/04/2020]
Reply With Quote #24

Looks fine.
__________________
HamletEagle is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-13-2020 , 11:12   Re: Advanced GlowMenu v2.0.0 [12/04/2020]
Reply With Quote #25

Updated my post & attachments. Updated my code so far with the purpose to keep it's functionallity. OciXCrom's suggestion of creating menu's different didn't work, so i'll stick with the current method untill this get's cleared up.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-14-2020 , 08:48   Re: Advanced GlowMenu v2.0.0 [12/04/2020]
Reply With Quote #26

Quote:
Originally Posted by Napoleon_be View Post
Everything else is fixed and ready to get updated. Big thanks for your feedback already.

Also, i tried using this:
PHP Code:
 iMainMenu menu_create("MAIN_MENU_HEADER""MainMenuHandler"true); 
But it's not working, it's just showing "MAIN_MENU_HEADER"
It's not working because you're using an older 1.8.3 build. Upgrade to the latest 1.9.

https://github.com/alliedmodders/amxmodx/pull/593
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-14-2020 , 16:52   Re: Advanced GlowMenu v2.0.0 [12/04/2020]
Reply With Quote #27

Quote:
Originally Posted by OciXCrom View Post
It's not working because you're using an older 1.8.3 build. Upgrade to the latest 1.9.

https://github.com/alliedmodders/amxmodx/pull/593
Well this should work no matter what version i use, is there something wrong with my version checks?

Server console logs
Code:
AMX Mod X 1.9.0.5263 (http://www.amxmodx.org)
Authors:
	David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
	Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
	Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
	Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Oct 27 2019 16:23:56
Built from: https://github.com/alliedmodders/amxmodx/commit/15a14a0a
Build ID: 5263:15a14a0a
Core mode: JIT+ASM32
__________________

Last edited by Napoleon_be; 04-14-2020 at 19:55.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-22-2020 , 12:30   Re: Advanced GlowMenu v2.0.0 [12/04/2020]
Reply With Quote #28

Update: v2.0.1 released. Check first post for update notes. I have temporarely removed the other ML Translations untill everything is updated. Only English & Dutch available at the moment.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-23-2020 , 07:11   Re: Advanced GlowMenu v2.0.1 [22/04/2020]
Reply With Quote #29

I understand you updated and added more features, but it is just a glow menu at the end of the day. Why should it be moved back to New Plugins and reviewed? I'd like to hear some arguments.
__________________
HamletEagle is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 04-23-2020 , 08:54   Re: Advanced GlowMenu v2.0.1 [22/04/2020]
Reply With Quote #30

Quote:
Originally Posted by HamletEagle View Post
I understand you updated and added more features, but it is just a glow menu at the end of the day. Why should it be moved back to New Plugins and reviewed? I'd like to hear some arguments.
The plugin will be more usefull once i add the AimGlow option. A lot of jailbreak servers need a plugin like this, and so far i haven't seen any approved ones yet that qualify this one.

Suggestions are always welcome, also cvar related, i think there should be more customizations. I'm also thinking of the ability to add colors by a console command.
__________________

Last edited by Napoleon_be; 04-23-2020 at 09:16.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode