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

AMXX Update Notice


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 03-20-2023 , 21:07   AMXX Update Notice
Reply With Quote #1

  • Description
    This plugin will check if AMX Mod X is running the latest build
  • Cvars
    update_notice - (default "1.9") amxx version to look after to
    Note that it can only follow updates for 1.9 and 1.10 versions.
  • Modules
    Requires < sockets > & < nvault >
  • Install
    1. Works on AMXX 1.8.1
    2. Drag amxx_update_notice.sma to amxmodx/scripting folder
    3. Click "Get Plugin" and drag amxx_update_notice.amxx to amxmodx/plugins folder
    4. Type amxx_update_notice.amxx in amxmodx/configs/plugins.ini file
    5. Type update_notice "<AMXX_VERISON>" in amxmodx/configs/amxx.cfg file
  • Credits
    fysiks - version comparisment
  • Additional information
    Instead of sending a request to check latest amxx version at amxmodx website every map change, it will only do it once a day and will save that value with today's date assigned as the key.
    If a new version is released, the plugin will alert all admins 5 minutes after the map change.
  • Image

Attached Files
File Type: sma Get Plugin or Get Source (amxx_update_notice.sma - 99 views - 3.9 KB)
__________________

Last edited by bigdaddy424; 03-22-2023 at 15:26.
bigdaddy424 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-20-2023 , 23:15   Re: AMXX Update Notice
Reply With Quote #2

No need to give trivial instructions for installing a plugin that is identical to installing all other plugins (FYI, the .sma file is not required to be on the server for the plugin to run). Also, using the compile date for the plugin version is a bad idea and defeats the entire purpose of version numbers.

That URL doesn't work for any version before 1.9 so that should probably be noted (and makes it pointless to run on anything older than the latest 1.9 version).

Should also clarify that the cvar can only be the major and minor version.

Each section of the version number should be compared independently as integers. Doing it with the string method will have issues in certain scenarios.
__________________
fysiks is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 03-21-2023 , 16:19   Re: AMXX Update Notice
Reply With Quote #3

i've made some changes and did the version comparison using integers and not strings since it makes more sense. the only reason thats compatible with 1.8.1 is so its the forum takes care of compiling the plugin for you
__________________
bigdaddy424 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-21-2023 , 23:55   Re: AMXX Update Notice
Reply With Quote #4

Mashing all the numbers together is not the proper way to compare versions and can cause incorrect results in some situations. However, you might be able to get away with it here assuming that the build number will never reset.

The proper way is to compare the components as integers independently. You can find an example in a few different programming languages here. C++ is the closest to Pawn.
__________________
fysiks is offline
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 03-22-2023 , 15:27   Re: AMXX Update Notice
Reply With Quote #5

Credited you for that, thanks
__________________
bigdaddy424 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 18:58.


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