Raised This Month: $ Target: $400
 0% 

[Help] map info


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-28-2009 , 17:13   Re: [Help] map info
Reply With Quote #1

Quote:
Originally Posted by ujjl View Post
I want to apply map specific settings so i need to know if there is a map-named config file present in my mod directory.
Just use the map specific configs that are built into AMX Mod X.
__________________

Last edited by fysiks; 11-28-2009 at 17:15.
fysiks is offline
ujjl
Senior Member
Join Date: Jul 2009
Location: Hungary
Old 11-28-2009 , 17:17   Re: [Help] map info
Reply With Quote #2

i have to read data, not setting cvars ...

like:
item_healthkit 324.0 234.0 123.0
item_battery 1231.0 123.0 310.0

Last edited by ujjl; 11-28-2009 at 17:20.
ujjl is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-28-2009 , 17:25   Re: [Help] map info
Reply With Quote #3

PHP Code:
new szMapName[32], szFilePath[128]
get_mapname(szMapNamecharsmax(szMapName))

formatex(szFilePathcharsmax(szFilePath), "addons/sev09/maps/%s.cfg"szMapName)

new 
fopen(szFilePath"rt")

if(
f)
{
    
// File exists and is open to start reading.
    
new szData[64]
    
    while( !
feof(f) )
    {
        
fgets(szDatacharsmax(szData))
        
trim(szData)
        
        
// szData contains a line from the file.
        // Do something with it :).
    
}
    
fclose(f)

Here ya go .
__________________
fysiks is offline
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 13:40.


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