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:25   Re: [Help] map info
Reply With Quote #1

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