Raised This Month: $ Target: $400
 0% 

Read data from file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 07-23-2010 , 11:56   Re: Read data from file
Reply With Quote #4

PHP Code:
stock print_file()
{
    
// Open a file, path starts from cstrike folder
    
new fp fopen("server.cfg"), buffer[100]
    
    
// Foef means is it end of file?
    
while (!foef(fp))
    {
        
// Get the line
        
fgets(fpbuffercharsmax(buffer)
        
// Print it in the server console
        
server_print("FILE CONTENT: %s"buffer)
    }
    
    
// Close file handle
    
fclose(fp)

I have not tested it. Wrote it here.
Also check the funcwiki for more function details.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 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 00:17.


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