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

Mapslist Generator [maps.ini]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Technical/Development       
Leo_BH
Junior Member
Join Date: Dec 2014
Location: Ukraine
Old 12-21-2017 , 17:47   Mapslist Generator [maps.ini]
Reply With Quote #1

The plugin generates a file maps.ini based on installed maps
Plugin reads all files with the extension bsp in the maps directory
Attached Files
File Type: sma Get Plugin or Get Source (mapslist_generator.sma - 887 views - 723 Bytes)
__________________

Last edited by Leo_BH; 12-21-2017 at 18:29.
Leo_BH is offline
Visinescu
Senior Member
Join Date: Dec 2015
Location: England now,Home Romania
Old 12-22-2017 , 10:42   Re: Mapslist Generator [maps.ini]
Reply With Quote #2

Nice, gonna test it out.
Visinescu is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-22-2017 , 11:35   Re: Mapslist Generator [maps.ini]
Reply With Quote #3

Do not hardcode the configs dir, use get_configsdir.
Use charsmax() instead of sizeof - 1.
Consider using the new file system.
__________________
HamletEagle is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 12-22-2017 , 11:47   Re: Mapslist Generator [maps.ini]
Reply With Quote #4

Quote:
Originally Posted by HamletEagle View Post
Do not hardcode the configs dir, use get_configsdir.
Use charsmax() instead of sizeof - 1.
Consider using the new file system.
but it`s bugged :/
__________________
retired chump
DjSoftero is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-22-2017 , 12:02   Re: Mapslist Generator [maps.ini]
Reply With Quote #5

Quote:
Originally Posted by DjSoftero View Post
but it`s bugged :/
Unless you can provide a simple test plugin to reproduce the issue I would not call it bugged.
__________________
HamletEagle is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 12-22-2017 , 12:37   Re: Mapslist Generator [maps.ini]
Reply With Quote #6

PHP Code:
#include <amxmodx>  
#include <amxmisc> 

public plugin_init()  
{  
    new 
data[128]
    
get_configsdir(datacharsmax(data))
    
log_to_file("addons/amxmodx/logs/get_configsdir_logs.txt"data

Spoiler
__________________
retired chump

Last edited by DjSoftero; 12-22-2017 at 12:37. Reason: put it in spoiler not to ruin the thread
DjSoftero is offline
Leo_BH
Junior Member
Join Date: Dec 2014
Location: Ukraine
Old 12-22-2017 , 12:55   Re: Mapslist Generator [maps.ini]
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
Use charsmax() instead of sizeof - 1.
string.inc
PHP Code:
#define charsmax(%1) (sizeof(%1)-1) 
charsmax or sizeof - 1 the works similarly
Attached Files
File Type: sma Get Plugin or Get Source (mapslist_generator.sma - 818 views - 728 Bytes)
__________________
Leo_BH is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-22-2017 , 15:04   Re: Mapslist Generator [maps.ini]
Reply With Quote #8

Quote:
Originally Posted by Leo_BH View Post
string.inc
PHP Code:
#define charsmax(%1) (sizeof(%1)-1) 
charsmax or sizeof - 1 the works similarly
I am aware of this. I am asking you to do that for consistency.
__________________

Last edited by HamletEagle; 12-22-2017 at 15:05.
HamletEagle is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-13-2020 , 09:16   Re: Mapslist Generator [maps.ini]
Reply With Quote #9

Plugin is too simple, unapproved.
__________________
HamletEagle 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 11:02.


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