FileSystem
#4

Quote:
Originally Posted by clavador
Посмотреть сообщение
I still don't get it how parsefile works, hehe.
Hmm..... ( Honestly I dont know how it works too, hehe, but I got it working in my admin script like this... )

pawn Код:
#define nyancat_directory  "nyans%s.INI"

new
    nyanCats[ MAX_PLAYERS ]
;

public OnPlayerConnect( playerid )
{
    new
        ohai[ 64 + 24 ]
    ;
 
    format( ohai, sizeof ( ohai ), nyancat_directory, name( playerid ) ); // stock name( playerid ) { blablablabla }
 
    INI_ParseFile( ohai, "loadNyanCats", .bExtra = true, .extra = playerid );

    new
        lol[ 128 ]
    ;
   
    format( lol, sizeof ( lol ), "Your nyancats are : %i.", nyanCats[ playerid ] );

    SendClientMessage( playerid, -1, lol );

    return 1;
}

forward loadNyanCats( playerid, name[ ], value[ ] );
public loadNyanCats( playerid, name[ ], value[ ] )
{
    INI_Int( "Nyancats", nyanCats[ playerid ] );
    return 1;
}
Reply


Messages In This Thread
FileSystem - by clavador - 04.07.2011, 06:49
Re: FileSystem - by Lorenc_ - 04.07.2011, 07:11
Respuesta: Re: FileSystem - by clavador - 04.07.2011, 07:51
Re: Respuesta: Re: FileSystem - by Basicz - 04.07.2011, 07:58
Respuesta: Re: Respuesta: Re: FileSystem - by clavador - 04.07.2011, 08:05

Forum Jump:


Users browsing this thread: 1 Guest(s)