Raised This Month: $ Target: $400
 0% 

The most played maps


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-07-2008 , 21:04   Re: The most played maps
Reply With Quote #3

Code:
#include <amxmodx> #include <amxmisc> #include <fvault> new const g_vault_name[] = "popular_maps"; public plugin_init() {     register_concmd("amx_popular_maps", "CmdMaps", ADMIN_MAP);         new mapname[64];     get_mapname(mapname, sizeof(mapname) - 1);         new info[10];     fvault_get_data(g_vault_name, mapname, info, sizeof(info) - 1);         num_to_str(str_to_num(info) + 1, info, sizeof(info) - 1);         fvault_set_data(g_vault_name, mapname, info); } public CmdMaps(client, level, cid) {     if( !cmd_access(client, level, cid, 1) )     {         return PLUGIN_HANDLED;     }         new Array:maps = ArrayCreate();     new Array:count = ArrayCreate();     new total;         new size = fvault_size(g_vault_name);     new mapname[64], info[10];     for( new i = 0; i < size; i++ )     {         fvault_get_keyname(g_vault_name, i, mapname, sizeof(mapname) - 1);                 fvault_get_data(g_vault_name, mapname, info, sizeof(info) - 1);                 ArrayPushString(maps, mapname);         ArrayPushCell(count, str_to_num(info));         total++;     }         // i got lazy but...     // just sort them by count, and you will have all 5.     // "maps" contains all maps ever played on the server     // "count" contains the amount of times played for each map         return PLUGIN_HANDLED; }

#include <fvault>
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 03:11.


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