Raised This Month: $ Target: $400
 0% 

Reading Files


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 10-11-2010 , 12:12   Re: Reading Files
Reply With Quote #2

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

new file;

public plugin_init()
{
    register_plugin( "kdj", "10", "ra1n" )
    file = fopen( "testing.txt", "rt" )
    set_task( 30.0, "readFile", _, _, _, "a" )
}

public readFile()
{
    new buffer[256], asterisks[256]
    fgets( file, buffer, 255 )
    new i = 1
    if( equal( buffer[0], "*" ) )
    {
        while( !equal(buffer[i], "*" ) )
        {
            add( asterisks, charsmax( asterisks ), buffer[i] )
            i++;
        }
        
        new arg1[128], arg2[128]
        parse( buffer, arg1, 127, arg2, 127 )
        
        client_print( 0, print_chat, "%s is not in asterisks.", arg2 )
        client_print( 0, print_chat, "%s is in asterisks", asterisks )
    }
    
}
Maybe???
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please

Last edited by nikhilgupta345; 10-11-2010 at 12:20.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
 



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 10:26.


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