Raised This Month: $12 Target: $400
 3% 

Armoury Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-25-2016 , 17:50   Re: Armoury Manager
Reply With Quote #11

New version posted with enhancements and bug fixes and added tool for download:
Code:
 0.2c   Added multi-player support. Multiple players can now edit/create armoury entities at the same time. It was never actually documented that this wasn't possible--but now it is.
 0.2c   Made all huds disappear instantly once the manager is disabled. Previously, they would remain for 1~2 seconds while the holdtime expired.
 0.2c   Fixed rendering issue for when the manager is enabled and a deleted entity is hovered over and glows. When the glow is removed, it was rendering back to normal instead of semi-transparent.
 0.2c	Fixed invalid player error in traceline forward. 
 0.2c	Fixed bug when a created entity was deleted. The weapon deletion was not restored on map change.
 0.2c	Fixed bug that was breaking the aim origin returned in traceline. When the user selected to create an entity and exited out of the menu, I was not first checking if the user had an 
	existing entity selected before performing actions on the entity index. This was allowing actions to be taken on an entity index of 0 which was breaking traceline.	
 0.2c	Removed some redundant code.
__________________

Last edited by Bugsy; 01-25-2016 at 19:12.
Bugsy is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-29-2016 , 18:47   Re: Armoury Manager
Reply With Quote #12

Nice plugin, Bugsy.
zmd94 is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-01-2016 , 15:08   Re: Armoury Manager
Reply With Quote #13

Hi Bugsy, good code. Looks like you spend a quite some time on it. But if you still interest, I have some ideas:
  1. To have unlimited entities using a dynamic array instead of static. It is a script peek up, to help anyone who is reading this and beginning to script, see the changes from static to dynamic:
    Spoiler

  2. To use the newer 'client_disconnected' when compiling at the AMXX 183. Snippet:
    Code:
    #if AMXX_VERSION_NUM < 183 public client_disconnect( id ) #else public client_disconnected( id ) #endif {
  3. To put the small menu functions 'ShowTypeMenu' and 'ShowCountMenu' a little up on the code after 'SaveAndResetVars', because they are now 9 functions away from its caller separed by big functions as 'DeleteConfig', 'DisableManager', 'EnableManager' and 'RoundStart'.

  4. Code:
    //Shows a MOTD status of any entities that have been created or changed. The MOTD character limit is too low to allow displaying //every entity on a map that has > ~12 entities. public DisplayInfo( id , level , cid ) {
    If I understand correctly, you could write various 'motd_page1.html', 'motd_page2.hmtl', etc, on disk and create links between them. Ex: [Page fotter] Next page - Previous page - First Page - Last Page. So, you could show all weapons working around this limitation using several pages, instead of just one big and scrollable one.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 02-01-2016 at 16:58. Reason: spelling fix
addons_zz is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-01-2016 , 16:29   Re: Armoury Manager
Reply With Quote #14

Quote:
Originally Posted by addons_zz View Post
Hi Bugsy, good code. Looks like you spend a quite some time on it. But if you still interest, I have some ideas:
  1. To have unlimited entities using a dynamic array instead of static. Change example:
Thanks, but I do not need a scripting tutorial from you, I know how to use dynamic arrays. The plugin is in its early stages and going into it I thought 100 is more than enough. If I hear reports of people hitting the max, I will then consider options to increase the max entities.
Quote:
Originally Posted by addons_zz View Post
  1. To use the newer 'client_disconnected' when compiling at the AMXX 183. Snippet:
    Code:
    #if AMXX_VERSION_NUM < 183 public client_disconnect( id ) #else public client_disconnected( id ) #endif {
I personally do not want to use pre-compiler directives in code for 1.8.3 things unless it is absolutely worth it. Once it is stable/official, I will begin using that.
Quote:
Originally Posted by addons_zz View Post
  1. To put the small menu functions 'ShowTypeMenu' and 'ShowCountMenu' a little up on the code after 'SaveAndResetVars', because they are now 9 functions away from its caller separed by big functions as 'DeleteConfig', 'DisableManager', 'EnableManager' and 'RoundStart'.
I don't see the point with this, I think it is fine. I put non-public functions below the public functions, it's just how I did it and I have no problems navigating through the code/functions.
Quote:
Originally Posted by addons_zz View Post
  1. Code:
    //Shows a MOTD status of any entities that have been created or changed. The MOTD character limit is too low to allow displaying //every entity on a map that has > ~12 entities. public DisplayInfo( id , level , cid ) {
    If I understand correctly, you could write various 'motd_page1.html', 'motd_page2.hmtl', etc, on disk and create links between them. Ex: [Page fotter] Next page - Previous page - First Page - Last Page. So, you could show all weapons working around this limitation using several pages, instead of just one big and scrollable one.
This I do agree with and will do.
__________________
Bugsy is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-01-2016 , 16:55   Re: Armoury Manager
Reply With Quote #15

Quote:
Originally Posted by Bugsy View Post
Thanks, but I do not need a scripting tutorial from you, I know how to use dynamic arrays.
This isn't a script tutorial, it was a script peek up, to help anyone who is reading this and beginning to script, see the changes from static to dynamic.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 02-01-2016 at 16:58. Reason: spelling fix
addons_zz is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-02-2016 , 11:28   Re: Armoury Manager
Reply With Quote #16

I dont think the multipage motd will work. If I have a URL to another file(s), it will have to exist on a webserver of some sort as linking to a file with only a folder path makes it look on the client machine. I wish I could call show_motd() from a URL. Someone correct me if I'm wrong. I'm sure this has been attempted before.
Bugsy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-02-2016 , 11:52   Re: Armoury Manager
Reply With Quote #17

IIRC, you can use show_motd on an url.
__________________
HamletEagle is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-02-2016 , 11:59   Re: Armoury Manager
Reply With Quote #18

Yes, what I meant is call an amxmodx function (show_motd()) from a URL, not open a URL to display to the user.

The problem/issue is getting the alternate/linked HTML files on the server to display on the user machine.
__________________

Last edited by Bugsy; 02-02-2016 at 12:00.
Bugsy is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 02-02-2016 , 16:01   Re: Armoury Manager
Reply With Quote #19

Cool plugin thank you!
Syturi0 is offline
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 02-02-2016 , 18:52   Re: Armoury Manager
Reply With Quote #20

I found I way, where using a PHP server, you can send commands client. This would require set up a php server just to call the functions. Communication PHP <-> AMXX via MOTD, but this is too much work when there is more friendly approaches.

You create a menu to show the motd information instead of the motd.

Or when you call 'am_info' you open a menu, to choose which motd page to show [Next page - Previous page - First Page - Last Page]. Once you choose a page, you open the motd on that page, but do not close the menu, one you close the motd current page, you can choose another on/from the menu, or close the menu with exit.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
Reply


Thread Tools
Display Modes

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 06:06.


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